@notambourine/metafields 0.2.2 → 0.4.0

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/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  # @notambourine/metafields
2
2
 
3
- Declare Shopify metafield and metaobject definitions in TypeScript, inspect store drift, and apply
4
- controlled changes. The CLI never deletes or retypes a definition.
3
+ Version Shopify metafield and metaobject definitions in TypeScript, preview store drift, and apply supported changes. The CLI never deletes or retypes definitions. Requires Node.js 22.18+.
5
4
 
6
- Requires Node.js 22.18 or newer.
5
+ ## Define and sync a schema
7
6
 
8
- ## Quick start
7
+ Install the package, then create `schema.ts`:
9
8
 
10
- Create `schema.ts`:
9
+ ```sh
10
+ npm install --save-dev @notambourine/metafields
11
+ ```
11
12
 
12
13
  ```ts
13
14
  import { defineSchema, field, metaobject } from '@notambourine/metafields';
@@ -24,183 +25,95 @@ export default defineSchema({
24
25
  }),
25
26
  },
26
27
  metafields: {
27
- product: {
28
- custom: {
29
- promo_text: field.string({ name: 'Promo text' }),
30
- faq: field.metaobject('faq', { name: 'FAQ' }),
31
- },
32
- },
28
+ product: { custom: {
29
+ promo_text: field.string({ name: 'Promo text' }),
30
+ faq: field.metaobject('faq', { name: 'FAQ' }),
31
+ } },
33
32
  },
34
33
  });
35
34
  ```
36
35
 
37
- Validate it, inspect a store, then apply the plan:
36
+ Validate locally, authenticate, preview drift, then apply the same plan:
38
37
 
39
38
  ```sh
40
- npx @notambourine/metafields ./schema.ts --validate
41
- npx @notambourine/metafields ./schema.ts --store example.myshopify.com
42
- npx @notambourine/metafields ./schema.ts --store example.myshopify.com --apply
39
+ npx metafields ./schema.ts --validate
40
+ export SHOPIFY_ADMIN_ACCESS_TOKEN=...
41
+ npx metafields ./schema.ts --store example.myshopify.com
42
+ npx metafields ./schema.ts --store example.myshopify.com --apply
43
43
  ```
44
44
 
45
- Schema modules run as trusted local code through Node's type stripping. Use erasable TypeScript
46
- syntax. Compile untrusted pull-request declarations before a credentialed workflow consumes them:
45
+ Schema modules execute as trusted local code. For untrusted declarations, compile before introducing credentials:
47
46
 
48
47
  ```sh
49
- npx @notambourine/metafields compile ./schema.ts --out ./schema.json
48
+ npx metafields compile ./schema.ts --out ./schema.json
50
49
  ```
51
50
 
52
- Every command accepts `--json` and answers with a single JSON object on stdout, carrying the
53
- identities it left out under `excluded` or `skipped`. Without `--json`, the document goes to
54
- stdout and those identities to stderr, so stdout stays pipeable. Writing to `--out` reports
55
- `{"status":"written","out":"..."}` instead of the document.
51
+ ## Change policy
56
52
 
57
- ## Changes and safety
58
-
59
- Without `--apply`, the CLI only reports drift. A definition is updated as one unit: if any part is
60
- blocked or needs `--force`, its other changes wait too. Other definitions continue independently.
53
+ Each definition is atomic: if one attribute is blocked, its other changes wait. Other definitions continue independently.
61
54
 
62
55
  | Change | Required mode |
63
56
  | --- | --- |
64
- | Create a definition or add a metaobject field | `--apply` |
65
- | Update labels, `displayNameKey`, or enable a capability | `--apply` |
66
- | Change access, validations, constraints, or `required` | `--apply --force` |
67
- | Disable a capability | `--apply --force` |
68
- | Delete or retype a definition | Never performed |
69
- | Change invalid values or a definition Shopify is still validating | Never performed |
70
-
71
- `--force` opts into changes that can break a storefront or strand stored values. For schema sync it
72
- requires `--apply`; it cannot override Shopify constraints or repair data.
73
-
74
- Use `--dry-run` to cancel requested writes while preserving the plan and exit code:
75
-
76
- ```sh
77
- npx @notambourine/metafields ./schema.ts \
78
- --store example.myshopify.com --apply --force --dry-run
79
- ```
80
-
81
- Exit codes describe the result:
82
-
83
- - `0`: the store matches the schema.
84
- - `1`: actionable drift remains.
85
- - `2`: input is invalid, Shopify state is indeterminate, or an operation failed.
86
-
87
- Cosmetic label drift does not change the exit code. Mutations retry Shopify's explicit
88
- `THROTTLED` response, but are not retried after a timeout or `5xx` because the first request may
89
- have landed.
90
-
91
- ## Metaobject references
57
+ | Create a definition or add a field | `--apply` |
58
+ | Change a definition or field label, `displayNameKey`, or enable a capability | `--apply` |
59
+ | Change access, validation, constraints, `required`, or disable a capability | `--apply --force` |
60
+ | Delete, retype, override invalid values, or bypass Shopify validation | Unsupported |
92
61
 
93
- `field.metaobject()` and `field.mixedMetaobject()` name metaobject types, which are the same on
94
- every store. Shopify stores the reference as a definition ID, which is not, so the CLI resolves
95
- types to that store's IDs when it writes and reports them as types when it reads. A referenced
96
- metaobject must be declared in the same schema; it is created before anything that references it.
62
+ `--force` accepts storefront and stored-value risk; it does not override Shopify. `--dry-run` cancels requested writes without changing the plan or exit code. Mutations retry only Shopify's explicit `THROTTLED` response because retrying ambiguous failures could duplicate a completed write.
97
63
 
98
- ## Authentication
64
+ Exit codes describe store state: `0` matches, `1` has actionable drift, and `2` is invalid, indeterminate, or failed. Cosmetic label drift does not fail. Migration code `1` means rows remain pending.
99
65
 
100
- For one store, set an Admin API token:
66
+ ## Schema API
101
67
 
102
- ```sh
103
- export SHOPIFY_ADMIN_ACCESS_TOKEN=...
104
- ```
105
-
106
- For one store or a fleet, set app credentials. The CLI mints a short-lived token for each store:
107
-
108
- ```sh
109
- export SHOPIFY_APP_CLIENT_ID=...
110
- export SHOPIFY_APP_SECRET=...
111
- ```
68
+ Field builders:
112
69
 
113
- The client ID is resolved from `--client-id`, then `--app-config`, then
114
- `SHOPIFY_APP_CLIENT_ID`. The secret is read only from `SHOPIFY_APP_SECRET`.
70
+ - Values: `string`, `text`, `richText`, `integer`, `decimal`, `boolean`, `url`, `json`, `money`, `color`, `date`, `dateTime`, `rating`, `link`, `id`, `language`, `jurisdiction`, and `measurement`.
71
+ - References: `product`, `variant`, `collection`, `file`, `article`, `page`, `order`, `customer`, `company`, `metaobject`, and `mixedMetaobject`.
72
+ - Lists: wrap a builder with `field.list()`.
115
73
 
116
- ```sh
117
- npx @notambourine/metafields ./schema.ts \
118
- --app-config ./shopify.app.toml --store example.myshopify.com --apply
119
- ```
120
-
121
- `--app-config` reads only the top-level `client_id`. Complete app credentials take priority over a
122
- static token; incomplete app credentials fall back to the token. Credentials are redacted from
123
- errors.
124
-
125
- ## Fleets
74
+ Options are type-checked by each builder. Examples include `field.measurement('weight')`, `field.file({ fileTypes: ['Image'] })`, and `field.url({ allowedDomains: ['example.com'] })`.
126
75
 
127
- Repeat `--store` or load one store per line from a file. Lines beginning with `#` are ignored.
128
-
129
- ```sh
130
- npx @notambourine/metafields ./schema.ts \
131
- --store flagship.myshopify.com --stores-from ./stores.txt --apply
132
- ```
76
+ A metaobject field takes `adminFilterable` but not `access`, `constraints`, or the other capabilities, which Shopify keeps on metafield definitions alone. Declaring one of those on a metaobject field is rejected at compile rather than planned as drift no apply could clear.
133
77
 
134
- Each store is planned against the same schema. One store refusing a write does not stop the others.
135
- A store named directly fails loudly; a swept store without the app is reported as `NOT-INSTALLED`
136
- without failing the fleet. Other unreachable stores and rejected writes exit `2`.
78
+ Metaobject references name portable types in the schema; the CLI resolves their store-specific IDs and creates dependencies first. Shopify-owned disclosure and taxonomy references are not portable and cannot be declared.
137
79
 
138
- ## Pull and generated output
80
+ Infer application types directly from the schema:
139
81
 
140
- Pull existing definitions into a new schema file:
82
+ ```ts
83
+ import type { InferMetafields, InferMetaobjects } from '@notambourine/metafields';
84
+ import schema from './schema.js';
141
85
 
142
- ```sh
143
- npx @notambourine/metafields pull \
144
- --store example.myshopify.com \
145
- --owner product \
146
- --namespace custom \
147
- --metaobjects \
148
- --out schema.ts
86
+ type ProductMetafields = InferMetafields<typeof schema>['product'];
87
+ type Faq = InferMetaobjects<typeof schema>['faq'];
149
88
  ```
150
89
 
151
- Owners and namespaces must be explicit unless their corresponding `--all-owners` or
152
- `--all-namespaces` flag is passed. The output path must not exist; omit `--out` to write to stdout.
90
+ ## Other workflows
153
91
 
154
- Pull is lossy by design: Shopify serves more metafield types than a portable schema can declare, so
155
- it writes every definition it can and names the rest rather than refusing the store. Left-out
156
- identities arrive under `skipped`, next to the reserved-namespace definitions under `excluded`, and
157
- the generated file lists them with a reason in a comment at the top. A definition is skipped when
158
- no builder declares its type, when it carries a validation no option can state, or when it
159
- references a metaobject the same run did not write, which is every metaobject reference when
160
- `--metaobjects` is absent.
92
+ | Goal | Command |
93
+ | --- | --- |
94
+ | Sync a fleet | `npx metafields schema.ts --store a.myshopify.com --stores-from stores.txt --apply` |
95
+ | Pull selected store definitions | `npx metafields pull --store example.myshopify.com --owner product --namespace custom --metaobjects --out schema.ts` |
96
+ | Emit Liquid editor metadata | `npx metafields emit schema.ts --liquid --out .shopify/metafields.json` |
97
+ | Check the Shopify API type registry | `npx metafields doctor --api-version 2026-07` |
98
+ | Print all commands and options | `npx metafields --help` |
161
99
 
162
- Generate Liquid editor metadata from the schema:
100
+ Fleet files contain one store per line and support `#` comments. Directly named stores fail when unreachable; swept stores without the app report `NOT-INSTALLED` and do not fail the fleet.
163
101
 
164
- ```sh
165
- npx @notambourine/metafields emit ./schema.ts \
166
- --liquid --out .shopify/metafields.json
167
- ```
102
+ Each store reports one line per definition it creates, updates, skips, or blocks, each naming the metafield type or metaobject field count, and counts the definitions that already match on the `STORE` line. Use `--json` for the complete plan.
168
103
 
169
- The generated file supports Liquid completion and hover without a store login. It cannot represent
170
- metaobjects, `required`, validations, access, customer metafields, or draft-order metafields.
171
- `emit` refuses to replace a file it did not generate unless passed `--force`.
104
+ Pull requires explicit owners and namespaces, or their `--all-*` flags. It emits representable definitions and reports the rest under `skipped` and reserved namespaces under `excluded`. Without `--metaobjects`, metaobject references are skipped. Pull and compile never overwrite output files.
172
105
 
173
- ## Field types
106
+ Liquid output contains only editor-supported metafields. It omits metaobjects, customer and draft-order metafields, access, validation, constraints, and `required`. Emit overwrites only recognized generated output unless passed `--force`.
174
107
 
175
- Scalars are `string()`, `text()`, `richText()`, `integer()`, `decimal()`, `boolean()`, `url()`,
176
- `json()`, `money()`, `color()`, `date()`, `dateTime()`, `rating()`, `link()`, `id()`, `language()`,
177
- `jurisdiction()`, and `measurement()`, which names its unit type: `field.measurement('weight')`.
178
- References are `product()`, `variant()`, `collection()`, `file()`, `article()`, `page()`, `order()`,
179
- `customer()`, `company()`, `metaobject()`, and `mixedMetaobject()`. Wrap any of them in
180
- `field.list()` where Shopify publishes a list counterpart.
108
+ ## Authentication and output
181
109
 
182
- `file()` names the file kinds it accepts and `url()` and `link()` the domains they allow:
183
- `field.file({ fileTypes: ['Image'] })`, `field.url({ allowedDomains: ['example.com'] })`.
110
+ For one store, set `SHOPIFY_ADMIN_ACCESS_TOKEN`. For one store or a fleet, set `SHOPIFY_APP_CLIENT_ID` and `SHOPIFY_APP_SECRET`; the CLI mints a short-lived token per store. The client ID resolves from `--client-id`, `--app-config`, then the environment. Complete app credentials take priority over a static token, and credentials are redacted from errors.
184
111
 
185
- Shopify's disclosure and product-taxonomy references are the exception. Each points at a definition
186
- or taxonomy handle Shopify owns on the store itself, which no schema can create or carry to another
187
- store, so no builder declares them and `pull` reports them as skipped.
112
+ Operational commands support `--json`, producing one JSON object on stdout. In text mode, generated documents use stdout while `excluded` and `skipped` identities use stderr. `--out` reports a small written status instead of the document.
188
113
 
189
- ## Types
114
+ ## Copy values to a replacement definition
190
115
 
191
- Infer application types from the schema. Required declarations remain required:
192
-
193
- ```ts
194
- import type { InferMetafields, InferMetaobjects } from '@notambourine/metafields';
195
- import schema from './schema.js';
196
-
197
- type ProductMetafields = InferMetafields<typeof schema>['product'];
198
- type Faq = InferMetaobjects<typeof schema>['faq'];
199
- ```
200
-
201
- ## Migrations
202
-
203
- Migrations copy values to a new definition. They never retype or delete the source.
116
+ Migrations copy values; they never retype or delete the source. Define endpoints from the schema and use a package transform:
204
117
 
205
118
  ```ts
206
119
  import { defineMigration, transforms } from '@notambourine/metafields';
@@ -211,40 +124,18 @@ export default defineMigration({
211
124
  from: schema.metafields.product.custom.internet,
212
125
  to: schema.metafields.product.custom.internet_url,
213
126
  mode: 'copy',
214
- transform: transforms.url({
215
- allowedSchemes: ['http', 'https'],
216
- bareHost: 'reject',
217
- trim: true,
218
- }),
127
+ transform: transforms.url({ allowedSchemes: ['http', 'https'], bareHost: 'reject', trim: true }),
219
128
  onInvalid: 'fail',
220
129
  onTargetConflict: 'fail',
221
130
  });
222
131
  ```
223
132
 
224
- Compile before introducing credentials, inspect the plan, then apply it:
133
+ Compile without credentials, preview, then apply:
225
134
 
226
135
  ```sh
227
- npx @notambourine/metafields compile ./migration.ts --out ./migration.json
228
- npx @notambourine/metafields migrate ./migration.json --store example.myshopify.com
229
- npx @notambourine/metafields migrate ./migration.json --store example.myshopify.com --apply
136
+ npx metafields compile migration.ts --out migration.json
137
+ npx metafields migrate migration.json --store example.myshopify.com
138
+ npx metafields migrate migration.json --store example.myshopify.com --apply
230
139
  ```
231
140
 
232
- Migration exit code `1` means rows remain pending.
233
-
234
- ## API compatibility
235
-
236
- `doctor` checks that Shopify still serves the selected API version and that the package's generated
237
- metafield type table matches it. It needs no store or credentials.
238
-
239
- ```sh
240
- npx @notambourine/metafields doctor
241
- npx @notambourine/metafields doctor --api-version 2026-07 --json
242
- ```
243
-
244
- An unsupported version or changed type table is a failed check. An unreachable Shopify registry is
245
- indeterminate and exits `2`.
246
-
247
- Run `npx @notambourine/metafields --help` for the complete CLI reference.
248
-
249
- This `0.x` release is prerelease quality. Confirm scopes and behavior against a development store
250
- before production use.
141
+ This `0.x` package is prerelease quality. Verify scopes and behavior on a development store before production use.
@@ -11,6 +11,9 @@ export interface RawField {
11
11
  name: string;
12
12
  value: string;
13
13
  }[];
14
+ capabilities?: Record<string, {
15
+ enabled: boolean;
16
+ }>;
14
17
  }
15
18
  export interface RawMetafield extends RawField {
16
19
  id: string;
@@ -51,7 +54,7 @@ export interface RawMetaobject {
51
54
  export declare function mapField(value: RawField): ExistingField;
52
55
  export declare function mapMetafield(value: RawMetafield): ExistingMetafield;
53
56
  export declare function mapMetaobject(value: RawMetaobject): ExistingMetaobject;
54
- export declare const FIELD_SELECTION = "\n key name description type { name } required validations { name value }\n";
57
+ export declare const FIELD_SELECTION: string;
55
58
  export declare const METAFIELD_SELECTION: string;
56
- export declare const METAOBJECT_SELECTION = "\n id type name description displayNameKey\n access { admin storefront }\n capabilities { publishable { enabled } translatable { enabled } }\n fieldDefinitions { \n key name description type { name } required validations { name value }\n }\n";
59
+ export declare const METAOBJECT_SELECTION: string;
57
60
  //# sourceMappingURL=admin-shapes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin-shapes.d.ts","sourceRoot":"","sources":["../src/admin-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGzF,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE;YAAE,KAAK,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IACpF,gBAAgB,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB;AA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AE,QAAQ,GAAG,aAAa,CAevD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,CAanE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB,CActE;AAID,eAAO,MAAM,eAAe,QAG3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAKhC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { FIELD_CAPABILITIES } from './types.js';
1
+ import { FIELD_CAPABILITIES, METAOBJECT_FIELD_CAPABILITIES } from './types.js';
2
2
  export function mapField(value) {
3
- return {
3
+ const field = {
4
4
  key: value.key,
5
5
  name: value.name,
6
6
  description: value.description,
@@ -8,6 +8,10 @@ export function mapField(value) {
8
8
  required: value.required,
9
9
  validations: value.validations,
10
10
  };
11
+ if (value.capabilities) {
12
+ field.capabilities = Object.fromEntries(Object.entries(value.capabilities).map(([key, item]) => [key, item.enabled]));
13
+ }
14
+ return field;
11
15
  }
12
16
  export function mapMetafield(value) {
13
17
  return {
@@ -16,7 +20,6 @@ export function mapMetafield(value) {
16
20
  namespace: value.namespace,
17
21
  ownerType: value.ownerType,
18
22
  access: value.access,
19
- capabilities: Object.fromEntries(Object.entries(value.capabilities).map(([key, item]) => [key, item.enabled])),
20
23
  constraints: value.constraints
21
24
  ? { key: value.constraints.key, values: value.constraints.values.nodes.map((item) => item.value) }
22
25
  : null,
@@ -43,6 +46,7 @@ export function mapMetaobject(value) {
43
46
  // a capability Shopify adds is then one edit, not two that can silently disagree.
44
47
  export const FIELD_SELECTION = `
45
48
  key name description type { name } required validations { name value }
49
+ capabilities { ${METAOBJECT_FIELD_CAPABILITIES.map((name) => `${name} { enabled }`).join(' ')} }
46
50
  `;
47
51
  export const METAFIELD_SELECTION = `
48
52
  id namespace key ownerType name description type { name }
@@ -1 +1 @@
1
- {"version":3,"file":"admin-shapes.js","sourceRoot":"","sources":["../src/admin-shapes.ts"],"names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YACnD,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO;SACtD;QACD,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC;KAC7C,CAAC;AACJ,CAAC;AAED,iGAAiG;AACjG,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG;;mBAEZ,6BAA6B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;mBAIhB,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;;CAInF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;uBAIb,eAAe;CACrC,CAAC"}
package/dist/admin.js CHANGED
@@ -313,15 +313,16 @@ function metaobjectUpdateInput(entry, force) {
313
313
  input.capabilities = capabilityInput(definition.capabilities);
314
314
  }
315
315
  const missing = new Set();
316
- const drifted = new Set();
316
+ const drifted = new Map();
317
317
  for (const path of paths) {
318
318
  const added = /^fields\.([^.]+): missing$/.exec(path);
319
319
  if (added?.[1] !== undefined)
320
320
  missing.add(added[1]);
321
321
  else {
322
- const changed = /^fields\.([^.]+)\./.exec(path);
323
- if (changed?.[1] !== undefined)
324
- drifted.add(changed[1]);
322
+ const changed = /^fields\.([^.]+)\.(.+)$/.exec(path);
323
+ if (changed?.[1] !== undefined && changed[2] !== undefined) {
324
+ drifted.set(changed[1], [...drifted.get(changed[1]) ?? [], changed[2]]);
325
+ }
325
326
  }
326
327
  }
327
328
  const declared = new Map(definition.fields.map((field) => [field.key, field]));
@@ -331,10 +332,15 @@ function metaobjectUpdateInput(entry, force) {
331
332
  if (field)
332
333
  operations.push({ create: fieldCreateInput(field) });
333
334
  }
334
- for (const key of [...drifted].sort()) {
335
+ for (const [key, changed] of [...drifted].sort(([a], [b]) => a.localeCompare(b))) {
335
336
  const field = missing.has(key) ? undefined : declared.get(key);
336
- if (field)
337
- operations.push({ update: fieldUpdateInput(field) });
337
+ if (!field)
338
+ continue;
339
+ const update = fieldUpdateInput(field, changed);
340
+ // `key` alone identifies the field, so an input holding nothing else is a write with no
341
+ // opinion; Shopify would accept it and the operator would read it as a change.
342
+ if (Object.keys(update).length > 1)
343
+ operations.push({ update });
338
344
  }
339
345
  if (operations.length > 0)
340
346
  input.fieldDefinitions = operations;
@@ -349,19 +355,36 @@ function addLabels(input, paths, definition) {
349
355
  input.description = definition.description;
350
356
  }
351
357
  }
358
+ // No access or constraints here or below: compile refuses them on a metaobject field because
359
+ // Shopify's field definition input has nowhere to put them. Capabilities it does take, but only
360
+ // the ones compile allows, so this projects whatever survived it.
352
361
  function fieldCreateInput(field) {
353
- return { key: field.key, type: field.type, ...fieldUpdateInput(field) };
354
- }
355
- // No `type`: Shopify will not retype a field, and no `delete` operation is ever emitted.
356
- function fieldUpdateInput(field) {
357
- const result = { key: field.key, name: field.name };
362
+ const input = { key: field.key, type: field.type, name: field.name };
358
363
  if (field.description !== undefined)
359
- result.description = field.description;
364
+ input.description = field.description;
360
365
  if (field.required !== undefined)
361
- result.required = field.required;
366
+ input.required = field.required;
362
367
  if (field.validations.length > 0)
363
- result.validations = field.validations;
364
- return result;
368
+ input.validations = field.validations;
369
+ if (field.capabilities)
370
+ input.capabilities = capabilityInput(field.capabilities);
371
+ return input;
372
+ }
373
+ // Scoped the same way a definition update is: only the attributes the plan reported drifted, so
374
+ // relabelling a field never restates its validations or required flag. No `type` (Shopify will
375
+ // not retype a field) and no `delete` operation is ever emitted.
376
+ function fieldUpdateInput(field, paths) {
377
+ const input = { key: field.key };
378
+ addLabels(input, paths, field);
379
+ if (paths.some((path) => path.startsWith('required:')) && field.required !== undefined) {
380
+ input.required = field.required;
381
+ }
382
+ if (paths.includes('validations differ'))
383
+ input.validations = field.validations;
384
+ if (paths.some((path) => path.startsWith('capabilities.')) && field.capabilities) {
385
+ input.capabilities = capabilityInput(field.capabilities);
386
+ }
387
+ return input;
365
388
  }
366
389
  function metaobjectCreateInput(definition) {
367
390
  const input = {
package/dist/admin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,oBAAoB,GAEvE,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EACL,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAC/C,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAE7C,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,SAAS,CAAU;IAE5B,YAAY,OAAe,EAAE,SAAkB;QAC7C,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,SAAS,KAAK,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAClC,IAAI,CAAC,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,UAAU,CAAC,sCAAsC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,o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AAC;IAC9C,OAAO,IAAI,UAAU,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,SAAS,OAAO,CAAC,OAAe,EAAE,UAA0B;IAC1D,MAAM,OAAO,GAAG,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClG,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,KAAK,CAAC,YAAoB;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,gBAAgB,GAAG;;8CAEqB,oBAAoB;EAChE,CAAC;AAEH,gGAAgG;AAChG,0FAA0F;AAC1F,MAAM,eAAe,GAAG;;mDAE2B,mBAAmB;EACpE,CAAC;AAEH,MAAM,iBAAiB,GAAG;;;;;;EAMxB,CAAC;AAEH,MAAM,gBAAgB,GAAG;;;;;;EAMvB,CAAC;AAEH,8FAA8F;AAC9F,sCAAsC;AACtC,MAAM,iBAAiB,GAAG;;;;;;EAMxB,CAAC;AAEH,MAAM,gBAAgB,GAAG;;;;;;EAMvB,CAAC"}
package/dist/cli.js CHANGED
@@ -10,8 +10,8 @@ import { descriptionViolations } from './limits.js';
10
10
  import { loadDefault, loadSchema } from './loader.js';
11
11
  import { assertCompiledMigration, compileMigration, migrationExitCode, MIGRATION_MARKER, runMigration, } from './migration.js';
12
12
  import { emitLiquidMetafields, isLiquidMetafieldsFile } from './liquid.js';
13
- import { blockedAdvice } from './changes.js';
14
13
  import { pullSchema } from './pull.js';
14
+ import { renderFleet } from './render.js';
15
15
  import { compileSchema, OWNER_TYPES, SCHEMA_MARKER, stringifyCanonical } from './schema.js';
16
16
  import { doctorExitCode, runDoctor } from './doctor.js';
17
17
  const valueOptions = new Set([
@@ -344,61 +344,6 @@ function onlyPositional(args, label) {
344
344
  function output(args, json, text) {
345
345
  process.stdout.write(args.flags.has('json') ? stringifyCanonical(json) : text);
346
346
  }
347
- function renderFleet(result) {
348
- const lines = [];
349
- for (const outcome of result.stores) {
350
- if (outcome.status !== 'planned') {
351
- const label = outcome.status === 'not-installed' ? 'NOT-INSTALLED' : 'UNREACHABLE';
352
- lines.push(`${label} ${outcome.store} ${outcome.code ?? 'error'}: ${outcome.reason ?? ''}`.trimEnd());
353
- continue;
354
- }
355
- lines.push(`STORE ${outcome.store}`);
356
- for (const item of outcome.plan?.items ?? [])
357
- lines.push(...renderItem(item));
358
- const updated = new Set(outcome.updated ?? []);
359
- const skipped = new Set(outcome.skipped ?? []);
360
- for (const entry of outcome.drift?.items ?? []) {
361
- // The reasons are already above, under the plan item; only a refusal repeats one, next to
362
- // the line that says what to do about it.
363
- if (updated.has(entry.item.identity))
364
- lines.push(`UPDATED ${entry.item.identity}`);
365
- else if (!skipped.has(entry.item.identity))
366
- lines.push(`UPDATE ${entry.item.identity}`);
367
- else
368
- lines.push(...renderSkipped(entry));
369
- }
370
- for (const identity of outcome.created ?? [])
371
- lines.push(`CREATED ${identity}`);
372
- if (outcome.refused !== undefined)
373
- lines.push(`REFUSED ${outcome.store}: ${outcome.refused}`);
374
- }
375
- lines.push('');
376
- return lines.join('\n');
377
- }
378
- // The refusal carries the teaching, so the generic flag name costs nothing. BLOCKED matters
379
- // most: saying "--force cannot do this" is what stops someone reaching for it here.
380
- function renderSkipped(entry) {
381
- if (entry.blocked.length === 0) {
382
- return [
383
- `SKIPPED ${entry.item.identity}`,
384
- ...entry.needsForce.map((reason) => ` ${reason}`),
385
- ' re-run with --force to apply it',
386
- ];
387
- }
388
- const advice = [...new Set(entry.blocked.map((reason) => blockedAdvice(entry.item, reason)))];
389
- return [
390
- `BLOCKED ${entry.item.identity}`,
391
- ...entry.blocked.map((reason) => ` ${reason}`),
392
- ...advice.map((line) => ` ${line}`),
393
- ];
394
- }
395
- function renderItem(item) {
396
- return [
397
- `${item.status} ${item.identity}`,
398
- ...item.reasons.map((reason) => ` ${reason}`),
399
- ...item.notices.map((notice) => `NOTICE ${notice}`),
400
- ];
401
- }
402
347
  function isRecord(value) {
403
348
  return typeof value === 'object' && value !== null && !Array.isArray(value);
404
349
  }