@teambit/scope 1.0.511 → 1.0.513
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 +23383 -0
- package/debug-commands/cat-component.ts +1 -1
- package/debug-commands/cat-scope.ts +1 -1
- package/dist/debug-commands/cat-component.js.map +1 -1
- package/dist/debug-commands/cat-scope-cmd.d.ts +1 -1
- package/dist/debug-commands/cat-scope.d.ts +1 -1
- package/dist/debug-commands/cat-scope.js +4 -4
- package/dist/debug-commands/cat-scope.js.map +1 -1
- package/dist/{preview-1736711473672.js → preview-1736879479828.js} +2 -2
- package/dist/routes/fetch.route.js +4 -4
- package/dist/routes/fetch.route.js.map +1 -1
- package/dist/routes/put.route.js +4 -4
- package/dist/routes/put.route.js.map +1 -1
- package/dist/scope-aspects-loader.d.ts +1 -1
- package/dist/scope-aspects-loader.js.map +1 -1
- package/dist/scope-component-loader.js +6 -6
- package/dist/scope-component-loader.js.map +1 -1
- package/dist/scope.main.runtime.d.ts +1 -1
- package/dist/scope.main.runtime.js +31 -31
- package/dist/scope.main.runtime.js.map +1 -1
- package/package.json +41 -41
- package/routes/fetch.route.ts +1 -1
- package/routes/put.route.ts +1 -1
|
@@ -123,9 +123,9 @@ function _componentId() {
|
|
|
123
123
|
};
|
|
124
124
|
return data;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const data = require("@teambit/
|
|
128
|
-
|
|
126
|
+
function _objects() {
|
|
127
|
+
const data = require("@teambit/objects");
|
|
128
|
+
_objects = function () {
|
|
129
129
|
return data;
|
|
130
130
|
};
|
|
131
131
|
return data;
|
|
@@ -137,9 +137,9 @@ function _legacy() {
|
|
|
137
137
|
};
|
|
138
138
|
return data;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function _scope() {
|
|
141
141
|
const data = require("@teambit/scope.remote-actions");
|
|
142
|
-
|
|
142
|
+
_scope = function () {
|
|
143
143
|
return data;
|
|
144
144
|
};
|
|
145
145
|
return data;
|
|
@@ -151,9 +151,9 @@ function _dependencyResolver() {
|
|
|
151
151
|
};
|
|
152
152
|
return data;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function _scope2() {
|
|
155
155
|
const data = require("@teambit/scope.remotes");
|
|
156
|
-
|
|
156
|
+
_scope2 = function () {
|
|
157
157
|
return data;
|
|
158
158
|
};
|
|
159
159
|
return data;
|
|
@@ -179,9 +179,9 @@ function _component2() {
|
|
|
179
179
|
};
|
|
180
180
|
return data;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function _scope3() {
|
|
183
183
|
const data = require("@teambit/scope.network");
|
|
184
|
-
|
|
184
|
+
_scope3 = function () {
|
|
185
185
|
return data;
|
|
186
186
|
};
|
|
187
187
|
return data;
|
|
@@ -256,23 +256,23 @@ function _exceptions() {
|
|
|
256
256
|
};
|
|
257
257
|
return data;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function _scope4() {
|
|
260
260
|
const data = require("./scope.aspect");
|
|
261
|
-
|
|
261
|
+
_scope4 = function () {
|
|
262
262
|
return data;
|
|
263
263
|
};
|
|
264
264
|
return data;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function _scope5() {
|
|
267
267
|
const data = require("./scope.graphql");
|
|
268
|
-
|
|
268
|
+
_scope5 = function () {
|
|
269
269
|
return data;
|
|
270
270
|
};
|
|
271
271
|
return data;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function _scope6() {
|
|
274
274
|
const data = require("./scope.ui-root");
|
|
275
|
-
|
|
275
|
+
_scope6 = function () {
|
|
276
276
|
return data;
|
|
277
277
|
};
|
|
278
278
|
return data;
|
|
@@ -629,7 +629,7 @@ class ScopeMain {
|
|
|
629
629
|
force,
|
|
630
630
|
lanes
|
|
631
631
|
}, headers) {
|
|
632
|
-
const authData = (0,
|
|
632
|
+
const authData = (0, _scope3().getAuthDataFromHeader)(headers?.authorization);
|
|
633
633
|
const result = await (0, _legacy2().remove)({
|
|
634
634
|
path: this.path,
|
|
635
635
|
ids,
|
|
@@ -691,7 +691,7 @@ class ScopeMain {
|
|
|
691
691
|
}
|
|
692
692
|
async toObjectList(types) {
|
|
693
693
|
const objects = await this.legacyScope.objects.list(types);
|
|
694
|
-
return
|
|
694
|
+
return _objects().ObjectList.fromBitObjects(objects);
|
|
695
695
|
}
|
|
696
696
|
|
|
697
697
|
// TODO: temporary compiler workaround - discuss this with david.
|
|
@@ -1109,8 +1109,8 @@ class ScopeMain {
|
|
|
1109
1109
|
return (0, _component2().getDivergeData)({
|
|
1110
1110
|
modelComponent,
|
|
1111
1111
|
repo: this.legacyScope.objects,
|
|
1112
|
-
sourceHead: sourceHead ?
|
|
1113
|
-
targetHead: targetHead ?
|
|
1112
|
+
sourceHead: sourceHead ? _objects().Ref.from(sourceHead) : modelComponent.head || null,
|
|
1113
|
+
targetHead: targetHead ? _objects().Ref.from(targetHead) : modelComponent.head || null,
|
|
1114
1114
|
throws
|
|
1115
1115
|
});
|
|
1116
1116
|
}
|
|
@@ -1136,10 +1136,10 @@ class ScopeMain {
|
|
|
1136
1136
|
* @deprecated use `this.getRemoteScopes()` instead.
|
|
1137
1137
|
*/
|
|
1138
1138
|
async _legacyRemotes() {
|
|
1139
|
-
return (0,
|
|
1139
|
+
return (0, _scope2().getScopeRemotes)(this.legacyScope);
|
|
1140
1140
|
}
|
|
1141
1141
|
async getRemoteScopes() {
|
|
1142
|
-
return (0,
|
|
1142
|
+
return (0, _scope2().getScopeRemotes)(this.legacyScope);
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
1145
|
/**
|
|
@@ -1260,7 +1260,7 @@ class ScopeMain {
|
|
|
1260
1260
|
// no-op (it's relevant for the workspace only)
|
|
1261
1261
|
}
|
|
1262
1262
|
async hasObjects(hashes) {
|
|
1263
|
-
const refs = hashes.map(h =>
|
|
1263
|
+
const refs = hashes.map(h => _objects().Ref.from(h));
|
|
1264
1264
|
const results = await this.legacyScope.objects.hasMultiple(refs);
|
|
1265
1265
|
return results.map(r => r.hash);
|
|
1266
1266
|
}
|
|
@@ -1278,7 +1278,7 @@ class ScopeMain {
|
|
|
1278
1278
|
cli.register(...allCommands);
|
|
1279
1279
|
return undefined;
|
|
1280
1280
|
}
|
|
1281
|
-
const logger = loggerMain.createLogger(
|
|
1281
|
+
const logger = loggerMain.createLogger(_scope4().ScopeAspect.id);
|
|
1282
1282
|
const scope = new ScopeMain(harmony, legacyScope, componentExt, config, postPutSlot, postDeleteSlot, postExportSlot, postObjectsPersistSlot, preFetchObjectsSlot, OnCompAspectReCalcSlot, isolator, aspectLoader, logger, envs, depsResolver, globalConfig);
|
|
1283
1283
|
cli.register(...allCommands, new (_scopeGarbageCollector().ScopeGarbageCollectorCmd)(scope));
|
|
1284
1284
|
cli.registerOnStart(async hasWorkspace => {
|
|
@@ -1301,9 +1301,9 @@ class ScopeMain {
|
|
|
1301
1301
|
logger.debug(`onPutHook, completed. (${ids.length} components)`);
|
|
1302
1302
|
};
|
|
1303
1303
|
const getAuthData = () => {
|
|
1304
|
-
const token =
|
|
1304
|
+
const token = _scope3().Http.getToken();
|
|
1305
1305
|
return token ? {
|
|
1306
|
-
type:
|
|
1306
|
+
type: _scope3().DEFAULT_AUTH_TYPE,
|
|
1307
1307
|
credentials: token
|
|
1308
1308
|
} : undefined;
|
|
1309
1309
|
};
|
|
@@ -1329,15 +1329,15 @@ class ScopeMain {
|
|
|
1329
1329
|
await Promise.all(fns.map(async fn => fn(undefined, metadata)));
|
|
1330
1330
|
logger.debug(`onPostObjectsPersistHook, completed`);
|
|
1331
1331
|
};
|
|
1332
|
-
|
|
1333
|
-
|
|
1332
|
+
_scope().ExportPersist.onPutHook = onPutHook;
|
|
1333
|
+
_scope().PostSign.onPutHook = onPutHook;
|
|
1334
1334
|
_legacy().Scope.onPostExport = onPostExportHook;
|
|
1335
|
-
|
|
1335
|
+
_objects().Repository.onPostObjectsPersist = onPostObjectsPersistHook;
|
|
1336
1336
|
_legacy2().ExternalActions.externalActions.push(new (_clearCacheAction().ClearCacheAction)(scope));
|
|
1337
1337
|
express.register([new (_routes().PutRoute)(scope, postPutSlot), new (_routes().FetchRoute)(scope, logger), new (_routes().ActionRoute)(scope), new (_routes().DeleteRoute)(scope)]);
|
|
1338
1338
|
// @ts-ignore - @ran to implement the missing functions and remove it
|
|
1339
|
-
ui.registerUiRoot(new (
|
|
1340
|
-
graphql.register((0,
|
|
1339
|
+
ui.registerUiRoot(new (_scope6().ScopeUIRoot)(scope));
|
|
1340
|
+
graphql.register((0, _scope5().scopeSchema)(scope));
|
|
1341
1341
|
componentExt.registerHost(scope);
|
|
1342
1342
|
return scope;
|
|
1343
1343
|
}
|
|
@@ -1352,6 +1352,6 @@ _defineProperty(ScopeMain, "dependencies", [_component().ComponentAspect, _ui().
|
|
|
1352
1352
|
_defineProperty(ScopeMain, "defaultConfig", {
|
|
1353
1353
|
httpTimeOut: 600000
|
|
1354
1354
|
});
|
|
1355
|
-
|
|
1355
|
+
_scope4().ScopeAspect.addRuntime(ScopeMain);
|
|
1356
1356
|
|
|
1357
1357
|
//# sourceMappingURL=scope.main.runtime.js.map
|