@astryxdesign/cli 0.7.9-canary.048476f → 0.7.9-canary.07992bb

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.
Files changed (56) hide show
  1. package/api/discover/_adapter.d.mts +1 -1
  2. package/api/search/_main-searcher.mjs +1 -1
  3. package/api/search/_result.d.mts +5 -5
  4. package/api/search/search.d.mts +1 -1
  5. package/assets/docs/tree/calendar-systems.doc.mjs +146 -0
  6. package/assets/docs/tree/calendars.doc.mjs +46 -0
  7. package/assets/docs/tree/i18n-calendars.doc.mjs +51 -0
  8. package/assets/docs/tree/internationalization.doc.mjs +3 -3
  9. package/assets/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx +8 -7
  10. package/assets/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx +8 -7
  11. package/assets/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx +8 -7
  12. package/assets/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx +12 -10
  13. package/assets/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx +8 -7
  14. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.doc.mjs +2 -1
  15. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.tsx +2 -2
  16. package/assets/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +0 -1
  17. package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +0 -1
  18. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.doc.mjs +2 -1
  19. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +0 -2
  20. package/assets/templates/pages/table-inbox/page.tsx +11 -8
  21. package/assets/templates/pages/work-item-detail/page.tsx +6 -2
  22. package/authoring/debug/parse.d.mts +2 -2
  23. package/clients/cli/index.mjs +11 -6
  24. package/foundation/agent-docs/agent-docs-target.d.mts +49 -0
  25. package/foundation/agent-docs/agent-docs-target.mjs +201 -0
  26. package/foundation/agent-docs/agent-docs.d.mts +1 -38
  27. package/foundation/agent-docs/agent-docs.mjs +16 -181
  28. package/foundation/config/config-path.d.mts +13 -0
  29. package/foundation/config/config-path.mjs +42 -0
  30. package/foundation/config/project.d.mts +1 -10
  31. package/foundation/config/project.mjs +4 -26
  32. package/foundation/discovery/component-discovery.mjs +39 -4
  33. package/foundation/discovery/component-loader.d.mts +1 -1
  34. package/foundation/discovery/icon-set-paths.d.mts +18 -0
  35. package/foundation/discovery/icon-set-paths.mjs +23 -0
  36. package/foundation/discovery/icon-set-writer.d.mts +2 -7
  37. package/foundation/discovery/icon-set-writer.mjs +3 -12
  38. package/foundation/fs/module-loader.d.mts +2 -8
  39. package/foundation/fs/module-loader.mjs +3 -12
  40. package/foundation/fs/present-files.d.mts +11 -0
  41. package/foundation/fs/present-files.mjs +25 -0
  42. package/foundation/integrations/autolink.d.mts +2 -21
  43. package/foundation/integrations/autolink.mjs +6 -42
  44. package/foundation/integrations/contribution-fixes.mjs +26 -3
  45. package/foundation/integrations/contribution-inventory.mjs +1 -1
  46. package/foundation/integrations/installed-package.d.mts +36 -0
  47. package/foundation/integrations/installed-package.mjs +57 -0
  48. package/foundation/integrations/integrations.d.mts +3 -75
  49. package/foundation/integrations/integrations.mjs +3 -16
  50. package/foundation/integrations/manifest-paths.d.mts +13 -0
  51. package/foundation/integrations/manifest-paths.mjs +31 -0
  52. package/foundation/release/cache.d.mts +11 -4
  53. package/foundation/release/cache.mjs +15 -7
  54. package/foundation/runtime/locked-versions.mjs +1 -1
  55. package/foundation/runtime/package-set.mjs +1 -1
  56. package/package.json +9 -9
@@ -21,14 +21,6 @@
21
21
  * @returns {LoadedIntegration[]}
22
22
  */
23
23
  export function markProviderConflicts(integrations: LoadedIntegration[]): LoadedIntegration[];
24
- /**
25
- * Return the conventional root manifest paths present in `dir`, in
26
- * load-precedence order. Unlike {@link resolveManifestPath} this never throws —
27
- * callers (for example Doctor integration validation) decide how to treat zero / multiple.
28
- * @param {string} dir
29
- * @returns {string[]} absolute manifest paths
30
- */
31
- export function findManifestPaths(dir: string): string[];
32
24
  /**
33
25
  * Load and validate a manifest module's default export, while isolating the
34
26
  * optional `agentDocs` contribution from the manifest's other fields.
@@ -120,73 +112,6 @@ export function loadIntegrations(specs?: string[], { cwd, fresh, resolveProvider
120
112
  fresh?: boolean;
121
113
  resolveProviders?: boolean;
122
114
  }): Promise<LoadedIntegration[]>;
123
- /**
124
- * A fully-resolved, loaded integration. Identity (`name`, `version`) comes from
125
- * the package's package.json; the `components`/`templates`/`codemods`/`docs`/
126
- * `themes` roots are absolute paths resolved from the manifest. The `__`-prefixed fields
127
- * are internal bookkeeping used by Doctor integration validation and Project.
128
- * @typedef {object} LoadedIntegration
129
- * @property {string} name
130
- * @property {import('../../authoring/identity/type').ProviderId} [providerId]
131
- * normalized stable provider identity; absent only for a legacy unnamed local
132
- * package. Unique among contributing integrations: a later claimant is kept
133
- * inert with `__providerConflict` (see {@link markProviderConflicts})
134
- * @property {string} [version]
135
- * @property {string} [components]
136
- * @property {string} [templates]
137
- * @property {string} [codemods]
138
- * @property {string} [docs]
139
- * @property {string} [themes]
140
- * @property {string} [iconSets] the manifest's `experimental.iconSets` root
141
- * @property {string} [issuesUrl]
142
- * @property {{append?: readonly string[]}} [agentDocs]
143
- * @property {string} [cliCommand] the command this package's users run the
144
- * CLI with; read by the picker in foundation/env (see cli-command.mjs)
145
- * @property {string} [__cliCommandError] why a declared `cliCommand` was
146
- * ignored; the rest of the manifest still contributes
147
- * @property {string} [__agentDocsError] contribution-specific validation
148
- * failure; other manifest contributions remain available
149
- * @property {string} __spec
150
- * @property {string} [__declaredProviderId] the manifest's `providerId` as
151
- * written, kept by validation so it can tell whether the package has one
152
- * @property {string} __packageDir
153
- * @property {Record<string, unknown>|null} [__packageExports] the owning
154
- * package's `exports` map, kept from the package.json this loader already
155
- * parsed so import resolution does not read it a second time
156
- * @property {string} __manifestFile
157
- * @property {string} [__loadError] set when the manifest failed to load/validate;
158
- * such an integration contributes nothing and is surfaced via Project.issues()
159
- * @property {{providerId: import('../../authoring/identity/type').ProviderId, claimedBy: string, message: string}} [__providerConflict]
160
- * set on a package whose provider ID an earlier-loaded package already
161
- * claims; it contributes nothing and is reported as a `duplicate_provider`
162
- * warning
163
- * @property {string[]} [__declaredKeys] the keys the manifest object itself
164
- * declares, before any is filled in (providerId from the package name)
165
- * @property {string[]} [__unknownKeys] manifest keys this CLI does not know —
166
- * surfaced as a warning; the rest of the manifest still contributes
167
- * @property {boolean} [__autolinked] loaded because the project declares the
168
- * package as a dependency and it ships a manifest, with no astryx.config
169
- * entry naming it — see foundation/integrations/autolink.mjs
170
- * @property {boolean} [__computer] loaded because it is installed beside the
171
- * running CLI and the folder is outside a project (spec AST-081 FR12) — see
172
- * foundation/integrations/computer-integrations.mjs
173
- * @property {boolean} [__local] loaded from the package containing the current
174
- * working directory, so an author sees the exact bytes they are editing
175
- * @property {string} [__dependencyField] for an autolinked integration, the
176
- * package.json field that declared it (`dependencies`, `devDependencies`,
177
- * `optionalDependencies`)
178
- * @property {import('../../authoring/debug/type').DebugEventHandler} [__debug]
179
- * the manifest module's `debug` NAMED export, when it exported a function.
180
- * @property {import('../../authoring/gap-report/type').GapReportHandler} [__gapReport]
181
- * validated package-owned handler from the `gapReport` NAMED export.
182
- * @property {string} [__gapReportError] isolated named-handler validation error.
183
- * Named exports are not manifest keys — see {@link loadManifest}.
184
- * @property {import('../../authoring/discover/type').DiscoverSource} [__discover]
185
- * validated catalog source from the `discover` NAMED export.
186
- * @property {string} [__discoverError] isolated discover-source validation error.
187
- */
188
- /** Conventional manifest basenames, in load-precedence order. */
189
- export const MANIFEST_BASENAMES: string[];
190
115
  /**
191
116
  * A fully-resolved, loaded integration. Identity (`name`, `version`) comes from
192
117
  * the package's package.json; the `components`/`templates`/`codemods`/`docs`/
@@ -314,3 +239,6 @@ export type LoadedIntegration = {
314
239
  */
315
240
  __discoverError?: string | undefined;
316
241
  };
242
+ import { findManifestPaths } from './manifest-paths.mjs';
243
+ import { MANIFEST_BASENAMES } from './manifest-paths.mjs';
244
+ export { findManifestPaths, MANIFEST_BASENAMES };
@@ -32,6 +32,9 @@ import {
32
32
  unknownIntegrationKeys,
33
33
  } from '../../authoring/integration/schema.mjs';
34
34
  import {importUserModule, findPresentFiles} from '../fs/module-loader.mjs';
35
+ import {findManifestPaths, MANIFEST_BASENAMES} from './manifest-paths.mjs';
36
+
37
+ export {findManifestPaths, MANIFEST_BASENAMES};
35
38
  import {parseGapReportHandler} from '../../authoring/gap-report/parse.mjs';
36
39
  import {parseDiscoverSource} from '../../authoring/discover/parse.mjs';
37
40
  import {resolveProviders} from './provider-resolution.mjs';
@@ -102,12 +105,6 @@ import {resolveProviders} from './provider-resolution.mjs';
102
105
  * @property {string} [__discoverError] isolated discover-source validation error.
103
106
  */
104
107
 
105
- /** Conventional manifest basenames, in load-precedence order. */
106
- export const MANIFEST_BASENAMES = [
107
- 'astryx.integration.ts',
108
- 'astryx.integration.mjs',
109
- 'astryx.integration.js',
110
- ];
111
108
 
112
109
  /**
113
110
  * Normalize a package-owned provider ID without rejecting legacy unnamed local
@@ -153,16 +150,6 @@ export function markProviderConflicts(integrations) {
153
150
  ).integrations;
154
151
  }
155
152
 
156
- /**
157
- * Return the conventional root manifest paths present in `dir`, in
158
- * load-precedence order. Unlike {@link resolveManifestPath} this never throws —
159
- * callers (for example Doctor integration validation) decide how to treat zero / multiple.
160
- * @param {string} dir
161
- * @returns {string[]} absolute manifest paths
162
- */
163
- export function findManifestPaths(dir) {
164
- return findPresentFiles(dir, MANIFEST_BASENAMES);
165
- }
166
153
 
167
154
  /**
168
155
  * Parse the optional named gap-report handler without making it part of the
@@ -0,0 +1,13 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * Return the conventional root manifest paths present in `dir`, in
6
+ * load-precedence order. Unlike {@link resolveManifestPath} this never throws —
7
+ * callers (for example Doctor integration validation) decide how to treat zero / multiple.
8
+ * @param {string} dir
9
+ * @returns {string[]} absolute manifest paths
10
+ */
11
+ export function findManifestPaths(dir: string): string[];
12
+ /** Conventional manifest basenames, in load-precedence order. */
13
+ export const MANIFEST_BASENAMES: string[];
@@ -0,0 +1,31 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file manifest-paths.mjs
5
+ * @input A package folder
6
+ * @output MANIFEST_BASENAMES and findManifestPaths: the integration manifests
7
+ * a package has, in load-precedence order
8
+ * @position packages/cli/foundation/integrations: reads no manifest, so the
9
+ * run's package set finds them without integrations.mjs, its schemas and
10
+ * its module loader. integrations.mjs re-exports both.
11
+ */
12
+
13
+ import {findPresentFiles} from '../fs/present-files.mjs';
14
+
15
+ /** Conventional manifest basenames, in load-precedence order. */
16
+ export const MANIFEST_BASENAMES = [
17
+ 'astryx.integration.ts',
18
+ 'astryx.integration.mjs',
19
+ 'astryx.integration.js',
20
+ ];
21
+
22
+ /**
23
+ * Return the conventional root manifest paths present in `dir`, in
24
+ * load-precedence order. Unlike {@link resolveManifestPath} this never throws —
25
+ * callers (for example Doctor integration validation) decide how to treat zero / multiple.
26
+ * @param {string} dir
27
+ * @returns {string[]} absolute manifest paths
28
+ */
29
+ export function findManifestPaths(dir) {
30
+ return findPresentFiles(dir, MANIFEST_BASENAMES);
31
+ }
@@ -199,15 +199,22 @@ export function tryLock(lockDir: string, { now }?: {
199
199
  }): boolean;
200
200
  /**
201
201
  * Whether a process's arguments are this CLI's install of `version`, as
202
- * runNpm starts it: the program (`argv[0]`) is npm, or node running npm's
202
+ * runNpm starts it: the program (`argv[0]`) is npm, or a Node running npm's
203
203
  * entry file `npm-cli.js` (`argv[1]`), each exactly by name, and the arguments
204
- * include `install` and `@astryxdesign/cli@<version>`. A program that only has
205
- * `npm` somewhere in its name or arguments is not.
204
+ * include `install` and `@astryxdesign/cli@<version>`. A Node is one named
205
+ * `node` (with a version, such as `node22`), or one with the same file name
206
+ * as the Node runNpm starts npm with (`node`, by default this one), however
207
+ * it is named, such as `nodejs` or `node-linux-x64`. A program that only
208
+ * has `npm` somewhere in its name or arguments is not.
206
209
  * @param {string[]} argv
207
210
  * @param {string} version
211
+ * @param {{node?: string}} [options] `node`: the Node runNpm starts npm with
212
+ * (npmCommand's `execPath`; default: this one)
208
213
  * @returns {boolean}
209
214
  */
210
- export function isReleaseInstall(argv: string[], version: string): boolean;
215
+ export function isReleaseInstall(argv: string[], version: string, { node }?: {
216
+ node?: string;
217
+ }): boolean;
211
218
  /**
212
219
  * End the npm process group a stale lock records, only when that process is
213
220
  * surely the install the lock was taken for: its command line is this CLI's
@@ -823,15 +823,24 @@ function processFactsOf(pid, procRoot) {
823
823
 
824
824
  /**
825
825
  * Whether a process's arguments are this CLI's install of `version`, as
826
- * runNpm starts it: the program (`argv[0]`) is npm, or node running npm's
826
+ * runNpm starts it: the program (`argv[0]`) is npm, or a Node running npm's
827
827
  * entry file `npm-cli.js` (`argv[1]`), each exactly by name, and the arguments
828
- * include `install` and `@astryxdesign/cli@<version>`. A program that only has
829
- * `npm` somewhere in its name or arguments is not.
828
+ * include `install` and `@astryxdesign/cli@<version>`. A Node is one named
829
+ * `node` (with a version, such as `node22`), or one with the same file name
830
+ * as the Node runNpm starts npm with (`node`, by default this one), however
831
+ * it is named, such as `nodejs` or `node-linux-x64`. A program that only
832
+ * has `npm` somewhere in its name or arguments is not.
830
833
  * @param {string[]} argv
831
834
  * @param {string} version
835
+ * @param {{node?: string}} [options] `node`: the Node runNpm starts npm with
836
+ * (npmCommand's `execPath`; default: this one)
832
837
  * @returns {boolean}
833
838
  */
834
- export function isReleaseInstall(argv, version) {
839
+ export function isReleaseInstall(
840
+ argv,
841
+ version,
842
+ {node = process.execPath} = {},
843
+ ) {
835
844
  const name = (/** @type {string | undefined} */ arg) =>
836
845
  (arg ?? '')
837
846
  .split(/[\\/]/u)
@@ -839,9 +848,8 @@ export function isReleaseInstall(argv, version) {
839
848
  ?.replace(/\.(?:exe|cmd)$/iu, '')
840
849
  .toLowerCase() ?? '';
841
850
  const program = name(argv[0]);
842
- const npm =
843
- program === 'npm' ||
844
- (/^node(?:[-.\d]*)$/u.test(program) && name(argv[1]) === 'npm-cli.js');
851
+ const isNode = /^node(?:[-.\d]*)$/u.test(program) || program === name(node);
852
+ const npm = program === 'npm' || (isNode && name(argv[1]) === 'npm-cli.js');
845
853
  return (
846
854
  npm &&
847
855
  argv.includes('install') &&
@@ -14,7 +14,7 @@
14
14
 
15
15
  import * as path from 'node:path';
16
16
  import {findLockfile, lockedVersion, readJson} from '../release/project.mjs';
17
- import {resolveInstalledPackageDir} from '../integrations/autolink.mjs';
17
+ import {resolveInstalledPackageDir} from '../integrations/installed-package.mjs';
18
18
 
19
19
  const SCOPE = '@astryxdesign/';
20
20
  const FIELDS = ['dependencies', 'devDependencies', 'optionalDependencies'];
@@ -22,7 +22,7 @@
22
22
 
23
23
  import * as fs from 'node:fs';
24
24
  import * as path from 'node:path';
25
- import {findManifestPaths} from '../integrations/integrations.mjs';
25
+ import {findManifestPaths} from '../integrations/manifest-paths.mjs';
26
26
  import {readJson} from '../release/project.mjs';
27
27
  import {cliBinOf, isVersionRange} from '../release/cache.mjs';
28
28
  import {isValidSemver, satisfiesRange} from '../env/semver.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.7.9-canary.048476f",
3
+ "version": "0.7.9-canary.07992bb",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -124,10 +124,10 @@
124
124
  "zod": "^4.4.3"
125
125
  },
126
126
  "peerDependencies": {
127
- "@astryxdesign/charts": "0.7.9-canary.048476f",
128
- "@astryxdesign/core": "0.7.9-canary.048476f",
129
- "@astryxdesign/lab": "0.7.9-canary.048476f",
130
- "@astryxdesign/theme-neutral": "0.7.9-canary.048476f"
127
+ "@astryxdesign/charts": "0.7.9-canary.07992bb",
128
+ "@astryxdesign/core": "0.7.9-canary.07992bb",
129
+ "@astryxdesign/lab": "0.7.9-canary.07992bb",
130
+ "@astryxdesign/theme-neutral": "0.7.9-canary.07992bb"
131
131
  },
132
132
  "peerDependenciesMeta": {
133
133
  "@astryxdesign/charts": {
@@ -144,10 +144,10 @@
144
144
  }
145
145
  },
146
146
  "devDependencies": {
147
- "@astryxdesign/charts": "0.7.9-canary.048476f",
148
- "@astryxdesign/core": "0.7.9-canary.048476f",
149
- "@astryxdesign/lab": "0.7.9-canary.048476f",
150
- "@astryxdesign/theme-neutral": "0.7.9-canary.048476f",
147
+ "@astryxdesign/charts": "0.7.9-canary.07992bb",
148
+ "@astryxdesign/core": "0.7.9-canary.07992bb",
149
+ "@astryxdesign/lab": "0.7.9-canary.07992bb",
150
+ "@astryxdesign/theme-neutral": "0.7.9-canary.07992bb",
151
151
  "@heroicons/react": "^2.2.0",
152
152
  "@stylexjs/stylex": "^0.19.0",
153
153
  "@types/babel__core": "^7.20.5",