mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
chore: addowners
This commit is contained in:
parent
e2004a0c79
commit
231e1e0a19
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@ali/lowcode-engine-code-generator",
|
||||
"name": "@ali/lowcode-code-generator",
|
||||
"version": "0.8.0",
|
||||
"description": "出码引擎 for LowCode Engine",
|
||||
"main": "lib/index.js",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-demo",
|
||||
"private": true,
|
||||
"version": "0.8.0",
|
||||
"description": "低代码引擎 DEMO",
|
||||
"scripts": {
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
height: 5px;
|
||||
border: 2px solid var(--color-brand-light);
|
||||
border-radius: 2px;
|
||||
&.invalid {
|
||||
border-color: red;
|
||||
}
|
||||
|
||||
&.cover {
|
||||
top: 0;
|
||||
@ -17,6 +20,9 @@
|
||||
border: none;
|
||||
opacity: 0.3;
|
||||
border-radius: 0;
|
||||
&.invalid {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical {
|
||||
@ -25,7 +31,4 @@
|
||||
width: 5px;
|
||||
height: auto;
|
||||
}
|
||||
&.invalid {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
@ -787,7 +787,6 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
||||
const row = el ? isRowContainer(el.parentElement!) : false;
|
||||
const vertical = inline || row;
|
||||
|
||||
console.info('mm', inline, vertical, row, el);
|
||||
// TODO: fix type
|
||||
const near: any = {
|
||||
node: nearNode,
|
||||
|
||||
@ -427,8 +427,9 @@ export class Dragon {
|
||||
};
|
||||
|
||||
const sourceSensor = getSourceSensor(dragObject);
|
||||
const sensors: ISensor[] = (masterSensors as ISensor[]).concat(this.sensors);
|
||||
const chooseSensor = (e: LocateEvent) => {
|
||||
// this.sensors will change on dragstart
|
||||
const sensors: ISensor[] = (masterSensors as ISensor[]).concat(this.sensors);
|
||||
let sensor = e.sensor && e.sensor.isEnter(e) ? e.sensor : sensors.find((s) => s.sensorAvailable && s.isEnter(e));
|
||||
if (!sensor) {
|
||||
// TODO: enter some area like componentspanel cancel
|
||||
|
||||
@ -12,7 +12,6 @@ export default class EmbedTip extends Component<TipConfig> {
|
||||
|
||||
render() {
|
||||
saveTips(this.id, this.props);
|
||||
console.info(this.props);
|
||||
return <meta data-role="tip" data-tip-id={this.id} />;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ export default class DwellTimer {
|
||||
private previous?: NodeParent;
|
||||
private event?: LocateEvent;
|
||||
|
||||
constructor(private decide: (node: NodeParent, event: LocateEvent) => void, private timeout: number = 800) {}
|
||||
constructor(private decide: (node: NodeParent, event: LocateEvent) => void, private timeout: number = 500) {}
|
||||
|
||||
focus(node: NodeParent, event: LocateEvent) {
|
||||
this.event = event;
|
||||
|
||||
@ -146,6 +146,7 @@ export class OutlineMain implements ISensor, IScrollBoard, IScrollable {
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME: dirty connect to others
|
||||
if (at === '__IN_SETTINGS__') {
|
||||
setup();
|
||||
} else {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@ali/lowcode-react-simulator-renderer",
|
||||
"version": "0.8.0",
|
||||
"description": "react simulator renderer for alibaba lowcode designer",
|
||||
|
||||
70
scripts/addowner.js
Executable file
70
scripts/addowner.js
Executable file
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env node
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const process = require('process');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
let [ owner, pkg ] = process.argv.slice(2);
|
||||
|
||||
const packages_dir = path.join(__dirname, '..', 'packages');
|
||||
function getPackageNames() {
|
||||
const ls = fs.readdirSync(packages_dir, 'utf-8');
|
||||
const packageNames = [];
|
||||
ls.forEach((item) => {
|
||||
if (item.charAt(0) === '.') {
|
||||
return;
|
||||
}
|
||||
const packageJsonFile = path.join(packages_dir, item, 'package.json');
|
||||
|
||||
if (fs.existsSync(packageJsonFile)) {
|
||||
const json = require(packageJsonFile);
|
||||
if (!json.private && json.name) {
|
||||
packageNames.push(json.name)
|
||||
}
|
||||
}
|
||||
});
|
||||
return packageNames;
|
||||
}
|
||||
|
||||
const owners_file = path.join(__dirname, './owners.json');
|
||||
const owners = require(owners_file);
|
||||
function addPackageOwners(packageName) {
|
||||
owners.forEach(owner => addOwner(packageName, owner));
|
||||
}
|
||||
|
||||
function addOwner(packageName, owner) {
|
||||
console.info(`addowner "${owner}" for "${packageName}"`);
|
||||
try {
|
||||
execSync(`tnpm owner add ${owner} ${packageName}`, {
|
||||
encoding: 'utf-8'
|
||||
});
|
||||
console.info('OK');
|
||||
} catch (e) {
|
||||
console.info(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (pkg) {
|
||||
const packageJsonFile = path.join(packages_dir, item, 'package.json');
|
||||
|
||||
if (fs.existsSync(packageJsonFile)) {
|
||||
const json = require(packageJsonFile);
|
||||
if (!json.private && json.name) {
|
||||
pkg = json.name;
|
||||
}
|
||||
}
|
||||
if (owner === '*') {
|
||||
addPackageOwners(pkg);
|
||||
} else {
|
||||
addOwner(pkg, owner);
|
||||
}
|
||||
} else if (owner) {
|
||||
getPackageNames().forEach(packageName => {
|
||||
addOwner(packageName, owner);
|
||||
});
|
||||
} else {
|
||||
const pkgs = getPackageNames();
|
||||
pkgs.forEach(packageName => {
|
||||
addPackageOwners(packageName);
|
||||
});
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
todo
|
||||
13
scripts/owners.json
Normal file
13
scripts/owners.json
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
"bingbing.yb",
|
||||
"wuyue.xht",
|
||||
"xiayang.xy",
|
||||
"jianhui.fjh",
|
||||
"armslave.yy",
|
||||
"gengyang.gy",
|
||||
"alex.mm",
|
||||
"jianfang.rjf",
|
||||
"zude.hzd",
|
||||
"qianshan.wengqs",
|
||||
"mario.gk"
|
||||
]
|
||||
Loading…
x
Reference in New Issue
Block a user