@teambit/scope 1.0.318 → 1.0.319
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_scope_scope-preview.js +1 -1
- package/artifacts/schema.json +1528 -1528
- package/debug-commands/cat-component-cmd.ts +23 -0
- package/debug-commands/cat-component.ts +21 -0
- package/debug-commands/cat-lane-cmd.ts +17 -0
- package/debug-commands/cat-lane.ts +12 -0
- package/debug-commands/cat-object-cmd.ts +24 -0
- package/debug-commands/cat-object.ts +12 -0
- package/debug-commands/cat-scope-cmd.ts +45 -0
- package/debug-commands/cat-scope.ts +10 -0
- package/dist/debug-commands/cat-component-cmd.d.ts +11 -0
- package/dist/debug-commands/cat-component-cmd.js +38 -0
- package/dist/debug-commands/cat-component-cmd.js.map +1 -0
- package/dist/debug-commands/cat-component.d.ts +1 -0
- package/dist/debug-commands/cat-component.js +39 -0
- package/dist/debug-commands/cat-component.js.map +1 -0
- package/dist/debug-commands/cat-lane-cmd.d.ts +11 -0
- package/dist/debug-commands/cat-lane-cmd.js +34 -0
- package/dist/debug-commands/cat-lane-cmd.js.map +1 -0
- package/dist/debug-commands/cat-lane.d.ts +17 -0
- package/dist/debug-commands/cat-lane.js +31 -0
- package/dist/debug-commands/cat-lane.js.map +1 -0
- package/dist/debug-commands/cat-object-cmd.d.ts +15 -0
- package/dist/debug-commands/cat-object-cmd.js +38 -0
- package/dist/debug-commands/cat-object-cmd.js.map +1 -0
- package/dist/debug-commands/cat-object.d.ts +1 -0
- package/dist/debug-commands/cat-object.js +25 -0
- package/dist/debug-commands/cat-object.js.map +1 -0
- package/dist/debug-commands/cat-scope-cmd.d.ts +18 -0
- package/dist/debug-commands/cat-scope-cmd.js +71 -0
- package/dist/debug-commands/cat-scope-cmd.js.map +1 -0
- package/dist/debug-commands/cat-scope.d.ts +2 -0
- package/dist/debug-commands/cat-scope.js +26 -0
- package/dist/debug-commands/cat-scope.js.map +1 -0
- package/dist/{preview-1719544843434.js → preview-1719631375170.js} +2 -2
- package/dist/run-action/run-action.cmd.d.ts +10 -0
- package/dist/run-action/run-action.cmd.js +34 -0
- package/dist/run-action/run-action.cmd.js.map +1 -0
- package/dist/run-action/run-action.d.ts +1 -0
- package/dist/run-action/run-action.js +28 -0
- package/dist/run-action/run-action.js.map +1 -0
- package/dist/scope.main.runtime.js +37 -1
- package/dist/scope.main.runtime.js.map +1 -1
- package/package.json +21 -19
- package/run-action/run-action.cmd.ts +17 -0
- package/run-action/run-action.ts +9 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.319/dist/scope.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.319/dist/scope.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
export declare class RunActionCmd implements Command {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
private: boolean;
|
|
6
|
+
alias: string;
|
|
7
|
+
options: CommandOptions;
|
|
8
|
+
loadAspects: boolean;
|
|
9
|
+
report([actionName, remote, options]: [string, string, string]): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RunActionCmd = void 0;
|
|
7
|
+
function _runAction() {
|
|
8
|
+
const data = require("./run-action");
|
|
9
|
+
_runAction = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
class RunActionCmd {
|
|
18
|
+
constructor() {
|
|
19
|
+
_defineProperty(this, "name", 'run-action <action-name> <remote> <options>');
|
|
20
|
+
_defineProperty(this, "description", 'run an action on a remote');
|
|
21
|
+
_defineProperty(this, "private", true);
|
|
22
|
+
_defineProperty(this, "alias", '');
|
|
23
|
+
_defineProperty(this, "options", []);
|
|
24
|
+
_defineProperty(this, "loadAspects", false);
|
|
25
|
+
}
|
|
26
|
+
async report([actionName, remote, options]) {
|
|
27
|
+
const optionsParsed = JSON.parse(options);
|
|
28
|
+
const result = await (0, _runAction().runAction)(actionName, remote, optionsParsed);
|
|
29
|
+
return result || '';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.RunActionCmd = RunActionCmd;
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=run-action.cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_runAction","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RunActionCmd","constructor","report","actionName","remote","options","optionsParsed","JSON","parse","result","runAction","exports"],"sources":["run-action.cmd.ts"],"sourcesContent":["import { runAction } from './run-action';\nimport { Command, CommandOptions } from '@teambit/cli';\n\nexport class RunActionCmd implements Command {\n name = 'run-action <action-name> <remote> <options>';\n description = 'run an action on a remote';\n private = true;\n alias = '';\n options = [] as CommandOptions;\n loadAspects = false;\n\n async report([actionName, remote, options]: [string, string, string]) {\n const optionsParsed = JSON.parse(options);\n const result = await runAction(actionName, remote, optionsParsed);\n return result || '';\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyC,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAGlC,MAAMgB,YAAY,CAAoB;EAAAC,YAAA;IAAApB,eAAA,eACpC,6CAA6C;IAAAA,eAAA,sBACtC,2BAA2B;IAAAA,eAAA,kBAC/B,IAAI;IAAAA,eAAA,gBACN,EAAE;IAAAA,eAAA,kBACA,EAAE;IAAAA,eAAA,sBACE,KAAK;EAAA;EAEnB,MAAMqB,MAAMA,CAAC,CAACC,UAAU,EAAEC,MAAM,EAAEC,OAAO,CAA2B,EAAE;IACpE,MAAMC,aAAa,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAC;IACzC,MAAMI,MAAM,GAAG,MAAM,IAAAC,sBAAS,EAACP,UAAU,EAAEC,MAAM,EAAEE,aAAa,CAAC;IACjE,OAAOG,MAAM,IAAI,EAAE;EACrB;AACF;AAACE,OAAA,CAAAX,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runAction(actionName: string, remote: string, options?: {}): Promise<any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.runAction = runAction;
|
|
7
|
+
function _scope() {
|
|
8
|
+
const data = require("@teambit/legacy/dist/scope");
|
|
9
|
+
_scope = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _scopeRemotes() {
|
|
15
|
+
const data = require("@teambit/legacy/dist/scope/scope-remotes");
|
|
16
|
+
_scopeRemotes = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
async function runAction(actionName, remote, options = {}) {
|
|
22
|
+
const scope = await (0, _scope().loadScope)();
|
|
23
|
+
const scopeRemotes = await (0, _scopeRemotes().getScopeRemotes)(scope);
|
|
24
|
+
const remoteObj = await scopeRemotes.resolve(remote, scope);
|
|
25
|
+
return remoteObj.action(actionName, options);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=run-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_scope","data","require","_scopeRemotes","runAction","actionName","remote","options","scope","loadScope","scopeRemotes","getScopeRemotes","remoteObj","resolve","action"],"sources":["run-action.ts"],"sourcesContent":["import { loadScope, Scope } from '@teambit/legacy/dist/scope';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\n\nexport async function runAction(actionName: string, remote: string, options = {}): Promise<any> {\n const scope: Scope = await loadScope();\n const scopeRemotes = await getScopeRemotes(scope);\n const remoteObj = await scopeRemotes.resolve(remote, scope);\n return remoteObj.action(actionName, options);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,cAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,eAAeG,SAASA,CAACC,UAAkB,EAAEC,MAAc,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAgB;EAC9F,MAAMC,KAAY,GAAG,MAAM,IAAAC,kBAAS,EAAC,CAAC;EACtC,MAAMC,YAAY,GAAG,MAAM,IAAAC,+BAAe,EAACH,KAAK,CAAC;EACjD,MAAMI,SAAS,GAAG,MAAMF,YAAY,CAACG,OAAO,CAACP,MAAM,EAAEE,KAAK,CAAC;EAC3D,OAAOI,SAAS,CAACE,MAAM,CAACT,UAAU,EAAEE,OAAO,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -354,6 +354,41 @@ function _clearCacheAction() {
|
|
|
354
354
|
};
|
|
355
355
|
return data;
|
|
356
356
|
}
|
|
357
|
+
function _catScopeCmd() {
|
|
358
|
+
const data = require("./debug-commands/cat-scope-cmd");
|
|
359
|
+
_catScopeCmd = function () {
|
|
360
|
+
return data;
|
|
361
|
+
};
|
|
362
|
+
return data;
|
|
363
|
+
}
|
|
364
|
+
function _catComponentCmd() {
|
|
365
|
+
const data = require("./debug-commands/cat-component-cmd");
|
|
366
|
+
_catComponentCmd = function () {
|
|
367
|
+
return data;
|
|
368
|
+
};
|
|
369
|
+
return data;
|
|
370
|
+
}
|
|
371
|
+
function _catObjectCmd() {
|
|
372
|
+
const data = _interopRequireDefault(require("./debug-commands/cat-object-cmd"));
|
|
373
|
+
_catObjectCmd = function () {
|
|
374
|
+
return data;
|
|
375
|
+
};
|
|
376
|
+
return data;
|
|
377
|
+
}
|
|
378
|
+
function _catLaneCmd() {
|
|
379
|
+
const data = _interopRequireDefault(require("./debug-commands/cat-lane-cmd"));
|
|
380
|
+
_catLaneCmd = function () {
|
|
381
|
+
return data;
|
|
382
|
+
};
|
|
383
|
+
return data;
|
|
384
|
+
}
|
|
385
|
+
function _runAction() {
|
|
386
|
+
const data = require("./run-action/run-action.cmd");
|
|
387
|
+
_runAction = function () {
|
|
388
|
+
return data;
|
|
389
|
+
};
|
|
390
|
+
return data;
|
|
391
|
+
}
|
|
357
392
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
358
393
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
359
394
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1238,7 +1273,8 @@ class ScopeMain {
|
|
|
1238
1273
|
|
|
1239
1274
|
static async provider([componentExt, ui, graphql, cli, isolator, aspectLoader, express, loggerMain, envs, depsResolver, globalConfig], config, [postPutSlot, postDeleteSlot, postExportSlot, postObjectsPersistSlot, preFetchObjectsSlot, OnCompAspectReCalcSlot], harmony) {
|
|
1240
1275
|
const bitConfig = harmony.config.get('teambit.harmony/bit');
|
|
1241
|
-
|
|
1276
|
+
const debugCommands = [new (_catScopeCmd().CatScopeCmd)(), new (_catComponentCmd().CatComponentCmd)(), new (_catObjectCmd().default)(), new (_catLaneCmd().default)()];
|
|
1277
|
+
cli.register(new (_scopeCmd().ScopeCmd)(), ...debugCommands, new (_runAction().RunActionCmd)());
|
|
1242
1278
|
const legacyScope = await (0, _scopeLoader().loadScopeIfExist)(bitConfig?.cwd);
|
|
1243
1279
|
if (!legacyScope) {
|
|
1244
1280
|
return undefined;
|