piral-cli 1.3.1-beta.6128 → 1.3.1-beta.6133

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.
@@ -29,5 +29,5 @@ var LogLevels;
29
29
  * timestamps.
30
30
  */
31
31
  LogLevels[LogLevels["debug"] = 5] = "debug";
32
- })(LogLevels = exports.LogLevels || (exports.LogLevels = {}));
32
+ })(LogLevels || (exports.LogLevels = LogLevels = {}));
33
33
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";;;AAoDA,IAAY,SA2BX;AA3BD,WAAY,SAAS;IACnB;;OAEG;IACH,iDAAY,CAAA;IACZ;;OAEG;IACH,2CAAS,CAAA;IACT;;OAEG;IACH,+CAAW,CAAA;IACX;;OAEG;IACH,yCAAQ,CAAA;IACR;;;OAGG;IACH,+CAAW,CAAA;IACX;;;OAGG;IACH,2CAAS,CAAA;AACX,CAAC,EA3BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA2BpB"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";;;AAoDA,IAAY,SA2BX;AA3BD,WAAY,SAAS;IACnB;;OAEG;IACH,iDAAY,CAAA;IACZ;;OAEG;IACH,2CAAS,CAAA;IACT;;OAEG;IACH,+CAAW,CAAA;IACX;;OAEG;IACH,yCAAQ,CAAA;IACR;;;OAGG;IACH,+CAAW,CAAA;IACX;;;OAGG;IACH,2CAAS,CAAA;AACX,CAAC,EA3BW,SAAS,yBAAT,SAAS,QA2BpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-cli",
3
- "version": "1.3.1-beta.6128",
3
+ "version": "1.3.1-beta.6133",
4
4
  "description": "The standard CLI for creating and building a Piral instance or a Pilet.",
5
5
  "keywords": [
6
6
  "portal",
@@ -81,5 +81,5 @@
81
81
  "typescript": "^5.0.0",
82
82
  "yargs": "^15.0.0"
83
83
  },
84
- "gitHead": "0a7041321aa3b3c86371377f74094df506ec3bae"
84
+ "gitHead": "753b70c9eb69d73f0277952e22100ab16a3cfd43"
85
85
  }
@@ -147,11 +147,12 @@ async function resolveImportmap(
147
147
  const inheritedImports = importmap?.inherit;
148
148
  const excludedImports = importmap?.exclude;
149
149
 
150
- const onUnresolved = (entry: string) => {
150
+ const onUnresolved = (name: string, version: string) => {
151
151
  if (options.ignoreFailure) {
152
- log('skipUnresolvedDependency_0054', entry);
152
+ const id = version ? `${name}@${version}` : name;
153
+ log('skipUnresolvedDependency_0054', id);
153
154
  } else {
154
- fail('importMapReferenceNotFound_0027', dir, entry);
155
+ fail('importMapReferenceNotFound_0027', dir, name);
155
156
  }
156
157
  };
157
158
 
@@ -199,7 +200,7 @@ async function resolveImportmap(
199
200
  isAsync,
200
201
  );
201
202
  } else {
202
- onUnresolved(identifier);
203
+ onUnresolved(identifier, versionSpec);
203
204
  }
204
205
  } else if (!url.startsWith('.') && !isAbsolute(url)) {
205
206
  const entry = tryResolvePackage(url, dir);
@@ -224,7 +225,7 @@ async function resolveImportmap(
224
225
  isAsync,
225
226
  );
226
227
  } else {
227
- onUnresolved(url);
228
+ onUnresolved(url, versionSpec);
228
229
  }
229
230
  } else {
230
231
  const entry = resolve(dir, url);
@@ -256,7 +257,7 @@ async function resolveImportmap(
256
257
  isAsync,
257
258
  );
258
259
  } else if (isDirectory) {
259
- onUnresolved(entry);
260
+ onUnresolved(entry, versionSpec);
260
261
  } else {
261
262
  const hash = await getHash(entry);
262
263
 
@@ -271,16 +272,15 @@ async function resolveImportmap(
271
272
  });
272
273
  }
273
274
  } else {
274
- onUnresolved(url);
275
+ onUnresolved(url, versionSpec);
275
276
  }
276
277
  }
277
278
  }
278
279
  }
279
280
 
280
281
  if (Array.isArray(inheritedImports)) {
281
- const excluded = Array.isArray(excludedImports)
282
- ? [...options.excludedDependencies, ...excludedImports]
283
- : options.excludedDependencies;
282
+ const includedImports = [...options.excludedDependencies, ...dependencies.map((m) => m.name)];
283
+ const excluded = Array.isArray(excludedImports) ? [...includedImports, ...excludedImports] : includedImports;
284
284
 
285
285
  for (const inheritedImport of inheritedImports) {
286
286
  const otherDependencies = await getInheritedDependencies(inheritedImport, dir, excluded);