@cedarjs/cli 5.0.0-canary.2524 → 5.0.0-canary.2526

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.
@@ -23,7 +23,7 @@ const handler = async ({ model }) => {
23
23
  const { name } = await verifyModelName({ name: model, isDestroyer: true });
24
24
  await tasks({ model: name }).run();
25
25
  } catch (e) {
26
- console.log(c.error(e.message));
26
+ console.log(c.error(e instanceof Error ? e.message : String(e)));
27
27
  }
28
28
  };
29
29
  export {
@@ -16,9 +16,12 @@ function sieve(...listRulePairs) {
16
16
  }
17
17
  return result;
18
18
  }
19
+ function isAnyFn(value) {
20
+ return typeof value === "function";
21
+ }
19
22
  function forEachFunctionOn(object, callback) {
20
23
  forOwn(object, (value, key) => {
21
- if (typeof value === "function") {
24
+ if (isAnyFn(value)) {
22
25
  callback(key, value);
23
26
  }
24
27
  });
@@ -1,14 +1,26 @@
1
1
  function semanticIdentity(path) {
2
2
  const identity = {
3
- get(path2) {
4
- return path2.type in this ? this[path2.type](path2) : [path2.type];
3
+ get(p) {
4
+ return p.type in this ? this[p.type](p) : [p.type ?? "unknown"];
5
5
  },
6
- ObjectProperty: (path2) => [path2.node.key.name],
7
- VariableDeclarator: (path2) => [path2.node.id.name],
8
- ImportDeclaration: (path2) => [
6
+ ObjectProperty: (p) => {
7
+ const key = p.node.key;
8
+ if (key.type !== "Identifier") {
9
+ return [p.type];
10
+ }
11
+ return [key.name];
12
+ },
13
+ VariableDeclarator: (p) => {
14
+ const id = p.node.id;
15
+ if (id.type !== "Identifier") {
16
+ return [p.type];
17
+ }
18
+ return [id.name];
19
+ },
20
+ ImportDeclaration: (p) => [
9
21
  "ImportDeclaration",
10
22
  "source",
11
- path2.node.source.value
23
+ p.node.source.value
12
24
  ]
13
25
  };
14
26
  return path.getAncestry().reduce((acc, i) => [...identity.get(i), ...acc], []).join(".");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "5.0.0-canary.2524",
3
+ "version": "5.0.0-canary.2526",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,17 +33,17 @@
33
33
  "dependencies": {
34
34
  "@babel/parser": "7.29.7",
35
35
  "@babel/preset-typescript": "7.29.7",
36
- "@cedarjs/api-server": "5.0.0-canary.2524",
37
- "@cedarjs/cli-helpers": "5.0.0-canary.2524",
38
- "@cedarjs/fastify-web": "5.0.0-canary.2524",
39
- "@cedarjs/internal": "5.0.0-canary.2524",
40
- "@cedarjs/prerender": "5.0.0-canary.2524",
41
- "@cedarjs/project-config": "5.0.0-canary.2524",
42
- "@cedarjs/structure": "5.0.0-canary.2524",
43
- "@cedarjs/telemetry": "5.0.0-canary.2524",
44
- "@cedarjs/utils": "5.0.0-canary.2524",
45
- "@cedarjs/vite": "5.0.0-canary.2524",
46
- "@cedarjs/web-server": "5.0.0-canary.2524",
36
+ "@cedarjs/api-server": "5.0.0-canary.2526",
37
+ "@cedarjs/cli-helpers": "5.0.0-canary.2526",
38
+ "@cedarjs/fastify-web": "5.0.0-canary.2526",
39
+ "@cedarjs/internal": "5.0.0-canary.2526",
40
+ "@cedarjs/prerender": "5.0.0-canary.2526",
41
+ "@cedarjs/project-config": "5.0.0-canary.2526",
42
+ "@cedarjs/structure": "5.0.0-canary.2526",
43
+ "@cedarjs/telemetry": "5.0.0-canary.2526",
44
+ "@cedarjs/utils": "5.0.0-canary.2526",
45
+ "@cedarjs/vite": "5.0.0-canary.2526",
46
+ "@cedarjs/web-server": "5.0.0-canary.2526",
47
47
  "@listr2/prompt-adapter-enquirer": "4.2.1",
48
48
  "@opentelemetry/api": "1.9.1",
49
49
  "@opentelemetry/core": "1.30.1",