@sanoma-ai/workflows 0.4.0 → 0.4.2
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 +30 -28
- package/dist/define.d.ts +4 -1
- package/dist/define.js.map +1 -1
- package/dist/describe.d.ts +2 -0
- package/dist/describe.js +2 -1
- package/dist/describe.js.map +1 -1
- package/dist/fill.d.ts +4 -0
- package/dist/fill.js +13 -0
- package/dist/fill.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/op.d.ts +2 -0
- package/dist/op.js +4 -2
- package/dist/op.js.map +1 -1
- package/dist/plugin.d.ts +28 -0
- package/dist/plugin.js +51 -0
- package/dist/plugin.js.map +1 -1
- package/dist/scenario.js +56 -24
- package/dist/scenario.js.map +1 -1
- package/dist/vendor-info.d.ts +19 -0
- package/dist/vendor-info.js +49 -0
- package/dist/vendor-info.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/oxlint.json +2 -4
- package/package.json +1 -1
- package/src/define.ts +4 -1
- package/src/describe.ts +2 -1
- package/src/fill.ts +15 -0
- package/src/index.ts +2 -0
- package/src/op.ts +5 -2
- package/src/plugin.ts +73 -4
- package/src/scenario.ts +58 -24
- package/src/vendor-info.ts +53 -0
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ export default defineWorkflow({
|
|
|
37
37
|
});
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
A third argument says who the vendor is, so the app can show it: `defineConnector("shop", specs, { title: "Shop", logo: { svg, dark }, package, homepage })`. `logo.svg` is the vendor's mark as inline SVG markup, one `<svg>…</svg>` element (`defineConnector` refuses anything else, such as a file path or a URL), and `logo.dark` its variant for dark backgrounds, if it has one. The app shows a logo before each of the vendor's operations, in graphs and lists, and only ever as an image (`<img>` with a `data:` URL), where an SVG's scripts and external references never run or load. A vendor with no logo is shown by its operations' ids alone, as before. `package` is the connector's npm package name (`"@sanoma-ai/connector-resend"`), which the app's Connectors page links to on npm. `homepage` is the connector package's `homepage` from its package.json: where its code and README are, as an https URL (`defineConnector` refuses anything else); the Connectors page links to it as the connector's source. A vendor whose operations are split over several connectors is described by the first connector's info, its package and homepage as well as its title and logo.
|
|
40
|
+
A third argument says who the vendor is, so the app can show it: `defineConnector("shop", specs, { title: "Shop", logo: { svg, dark }, package, homepage })`. `logo.svg` is the vendor's mark as inline SVG markup, one `<svg>…</svg>` element (`defineConnector` refuses anything else, such as a file path or a URL), and `logo.dark` its variant for dark backgrounds, if it has one. The app shows a logo before each of the vendor's operations, in graphs and lists, and only ever as an image (`<img>` with a `data:` URL), where an SVG's scripts and external references never run or load. A vendor with no logo is shown by its operations' ids alone, as before. `package` is the connector's npm package name (`"@sanoma-ai/connector-resend"`), which the app's Connectors page links to on npm. `homepage` is the connector package's `homepage` from its package.json: where its code and README are, as an https URL (`defineConnector` refuses anything else); the Connectors page links to it as the connector's source. A vendor whose operations are split over several connectors is described by the first connector's info, its package and homepage as well as its title and logo. A connector package writes all of this once, in its package.json, and passes `vendorInfo(import.meta.url)` as the third argument (the nearest package.json is read): it reads the `"sanoma": { "title", "logo", "logoDark"? }` field, whose logos are SVG files in the package (relative `.svg` paths, listed in `files`), and the package's `name` and `homepage`. With the `sanoma-connector` keyword, the same field is how the app lists the package on npm before it is installed.
|
|
41
41
|
|
|
42
42
|
A [driver](#drivers) implements the operations and holds the credentials, and a [fake](#fakes-for-tests) stands in for the vendor in [sandbox runs](#scenarios-and-sandbox-runs). A connector package attaches both to the connector it exports, with `withSetup` (and its [steps](#steps-a-connector-ships) for Gherkin tests, as `steps`), so a config names the connector alone:
|
|
43
43
|
|
|
@@ -173,6 +173,8 @@ A run's ctx calls run one at a time, in program order. Even inside `Promise.all`
|
|
|
173
173
|
|
|
174
174
|
A workflow gets these on `ctx` by listing them in `uses`, next to its operations: `"approval"` (see [Approvals](#approvals)), `"sleep"` and `"all"`. `describeConfig` lists them as each workflow's `builtins`.
|
|
175
175
|
|
|
176
|
+
Every workflow has `ctx.runId` and `ctx.now()`, without `uses`. `await ctx.now()` is the time in epoch milliseconds, recorded so a replay reads the same. A date is made from it: with `const now = await ctx.now()`, `new Date(now).toISOString()` is ISO 8601 text, which a collection's `date` field takes (`.slice(0, 10)` for the day alone), and `new Date(now + 86_400_000)` is a day later, from the same reading. The lint refuses only the uses of `Date` that read the clock, `Date.now()`, `new Date()` and `Date()` (and `Date` passed on, which it cannot follow); `new Date(value)`, `Date.parse`, `Date.UTC` and `instanceof Date` read none (see [Keeping workflows replay-safe](#keeping-workflows-replay-safe)). Read a date in UTC (`toISOString`, `getUTCHours`) and parse ISO 8601 text with an offset: the local-time methods (`getHours`, `toLocaleString`) and other text depend on the worker's time zone, which a replay on another worker may not share.
|
|
177
|
+
|
|
176
178
|
`ctx.sleep({ until })` takes an ISO 8601 date-time with an offset (`2026-10-07T09:00:00Z`) or epoch milliseconds, and a time already past does not wait; `ctx.sleep({ minutes: 5 })` takes a duration from `ms`, `seconds`, `minutes`, `hours` and `days`, none negative. A request it can't read fails the run with `invalid_input`, as does an operation input its schema refuses. Each sleep writes a `sleep.started` record before it waits, with `until`: the time asked for, or for a duration, the record's `at` plus the duration, as the runtime saw it.
|
|
177
179
|
|
|
178
180
|
`ctx.all([() => …, () => …])` declares a fan-out: work that could go in any order, such as one post per network. It calls the members one after another, in array order, each awaited before the next starts, and returns their outputs in that order, each typed as its member's. It adds no concurrency: calls through `ctx` run one at a time anyway, and `ctx.all` says what belongs together, so the ledger and a graph of the run can show it. Every record written while a member runs (its operation calls, its approvals, its sleeps) carries `group: { id, index, size, node }`: `id` is `all:<seq>`, the ledger `seq` the run's next record would take when `ctx.all` began (so the same on a replay), `index` the member's position, `size` the member count and `node` the `ctx.all` call's [outline](#outline) node. Records outside a group have no `group`. The first member that throws stops the group: its error is rethrown as it is, and the members after it never run. A `ctx.all` inside a member fails with `invalid_input` (`ctx.all cannot be nested`), as does one started while another is still running (`a ctx.all is already running: await it before the next`) and an argument that is not a list of functions; an empty list returns `[]` and writes nothing.
|
|
@@ -412,7 +414,7 @@ Queues used to be one `sanoma` queue for every app and are now `sanoma:<appName>
|
|
|
412
414
|
|
|
413
415
|
A run is replayed after a restart by calling the function again and reading each step's result back, so workflows must do the same thing every time, and must reach vendors only through `ctx` so the policy sees every call. Two checks guard against getting that wrong by accident, on files under `workflows/`. They are not a sandbox: they read the source, and code written to get around them can.
|
|
414
416
|
|
|
415
|
-
oxlint, with the rules this package ships in `oxlint.json`, refuses the clock (`Date`, `performance`), randomness (`Math.random`, `crypto`), the network (`fetch`, `WebSocket`), timers, `process`, `globalThis`, `Promise.all` and its kin (use `ctx.all`; nothing races), and imports of `@sanoma-ai/testing`, `@sanoma-ai/app`, `@sanoma-ai/workflows/describe`, `@sanoma-ai/workflows/fake`, `@sanoma-ai/workflows/plugin`, `@sanoma-ai/workflows/scenario`, `@sanoma-ai/workflows/scenarios`, `@sanoma-ai/connector-*/fake` and `@sanoma-ai/connector-*/driver`. From `@sanoma-ai/workflows` it allows only `defineWorkflow`, `mayDecide`, `errorCode`, `z` (which `sanoma` re-exports) and types (the list is `allowImportNames` in `oxlint.json`; the `sanoma` package's own `oxlint.json` allows the same names from `sanoma` and refuses its subpaths): the rest could start runs or approve the run's own approvals (`SanomaClient`, `startWorker`), forge the audit record (`jsonlLedger`, `memoryLedger`: a store keeps the first record per id) or read credentials. Each message names the `ctx` replacement. `sanoma check` runs it, through `sanoma/oxlint.json`, which carries these rules; without `sanoma`, extend this package's from your `.oxlintrc.json` by its path: oxlint resolves `extends` as a file, not a package name, so `@sanoma-ai/workflows/oxlint` would not load. The `workflows/**` glob resolves against your config:
|
|
417
|
+
oxlint, with the rules this package ships in `oxlint.json`, refuses the clock (`Date.now()`, `new Date()` and `Date()`, through the plugin's rule `sanoma/date`, which allows `new Date(await ctx.now())`; `performance`), randomness (`Math.random`, `crypto`), the network (`fetch`, `WebSocket`), timers, `process`, `globalThis`, `Promise.all` and its kin (use `ctx.all`; nothing races), and imports of `@sanoma-ai/testing`, `@sanoma-ai/app`, `@sanoma-ai/workflows/describe`, `@sanoma-ai/workflows/fake`, `@sanoma-ai/workflows/plugin`, `@sanoma-ai/workflows/scenario`, `@sanoma-ai/workflows/scenarios`, `@sanoma-ai/connector-*/fake` and `@sanoma-ai/connector-*/driver`. From `@sanoma-ai/workflows` it allows only `defineWorkflow`, `mayDecide`, `errorCode`, `z` (which `sanoma` re-exports) and types (the list is `allowImportNames` in `oxlint.json`; the `sanoma` package's own `oxlint.json` allows the same names from `sanoma` and refuses its subpaths): the rest could start runs or approve the run's own approvals (`SanomaClient`, `startWorker`), forge the audit record (`jsonlLedger`, `memoryLedger`: a store keeps the first record per id) or read credentials. Each message names the `ctx` replacement. `sanoma check` runs it, through `sanoma/oxlint.json`, which carries these rules; without `sanoma`, extend this package's from your `.oxlintrc.json` by its path: oxlint resolves `extends` as a file, not a package name, so `@sanoma-ai/workflows/oxlint` would not load. The `workflows/**` glob resolves against your config:
|
|
416
418
|
|
|
417
419
|
```json
|
|
418
420
|
{
|
|
@@ -470,30 +472,30 @@ Feature: Announce a launch
|
|
|
470
472
|
|
|
471
473
|
The steps, as [Cucumber expressions](https://github.com/cucumber/cucumber-expressions) (`{op}` is an operation id, `{workflow}` a workflow name, `{who}` a person's id or a group's name, `{string}` a quoted string, `{resource}` a resource type such as `github.repository`, `{declared}` a declared resource as a drift report names it, `resources/identity/github.ts#website`, and `{field}` a field's dotted path; `And` and `But` take the keyword before them):
|
|
472
474
|
|
|
473
|
-
| Keyword | Step | What it does
|
|
474
|
-
| ------- | ---------------------------------------------------------------------------------------- |
|
|
475
|
-
| Given | `{op} was called with` and a JSON doc string or a two-column table (`name \| value`) | Seeds the fake: calls the operation through it before the run
|
|
476
|
-
| Given | `{op} fails once`, `{op} is rate limited once`, `{op} loses its reply once` | Injects the fault into the operation's next call (`failNext`, `rateLimit`, `loseReply`); its step has `fault: true`
|
|
477
|
-
| Given | `{resource} {string} has` and a two-column table (`field \| value`) or a JSON doc string | The vendor's fake holds the object with these fields: `Given github.repository "website" has` then `\| has_wiki \| true \|`
|
|
478
|
-
| Given | `{resource} {string} is gone` | The vendor's fake no longer holds the object: `Given github.repository "docs" is gone`
|
|
479
|
-
| Given | `{who} is acting` | Starts the run as that declared person or agent: `Given refund-bot is acting` (else `runScenario`'s `startedBy`, `scenarios` by default)
|
|
480
|
-
| When | `{workflow} runs with` and a JSON doc string or a two-column table (`name \| value`) | The workflow the scenario runs, and its input
|
|
481
|
-
| When | `{workflow} runs` | The same, with the input made up
|
|
482
|
-
| Any | `{string} is approved by {who}`, `… with note {string}`, and the `rejected` forms | How the approval with that title (or id, such as `approval-2`) is decided
|
|
483
|
-
| Then | `{op} was called with` and a JSON doc string or a two-column table | Expects a call whose input has at least these fields
|
|
484
|
-
| Then | `{op} was called`, `{op} was not called` | Expects a call to the operation, or none
|
|
485
|
-
| Then | `step {string} was called with` and a JSON doc string or a two-column table | Expects a call by the [step](#step-names) of that name whose input has at least these fields: `Then step "Draft the post" was called with` |
|
|
486
|
-
| Then | `step {string} was called`, `step {string} was not called` | Expects the named step to have run, or not
|
|
487
|
-
| Then | `step {string} ran {int} time(s)` | Expects the named step to have run that often: `Then step "Draft the post" ran 2 times`
|
|
488
|
-
| Then | `{op} was denied` | Expects the policy to have denied a call to it: `Then github.repository.import was denied`
|
|
489
|
-
| Then | `{op} was denied with {string}` | The same, with that reason (a Cedar policy's `@reason`): `Then shop.refunds.create was denied with "Agents do not refund"`
|
|
490
|
-
| Then | `{op} was held for {who}` | Expects an approval for that approver to have held it: `Then stripe.product.import was held for finance`
|
|
491
|
-
| Then | `{op} was held for group {string}` | The same, for the group alone, never a person of that id: `Then shop.refunds.create was held for group "finance"`
|
|
492
|
-
| Then | `{declared} is drifted in {field}` | For a drift run: `Then resources/identity/github.ts#website is drifted in has_wiki`
|
|
493
|
-
| Then | `{declared} is clean`, `{declared} is gone`, `{declared} is absent` | For a drift run: `Then resources/identity/github.ts#docs is clean`
|
|
494
|
-
| Then | `apply creates {declared}` | For an apply run: it created the resource (or made a gone one again): `Then apply creates resources/identity/github.ts#docs`
|
|
495
|
-
| Then | `{declared} is bound to {string}` | For an apply run: the lockfile it ended with binds it so: `Then resources/identity/rules.ts#docsMain is bound to "BPR_docs:main"`
|
|
496
|
-
| Then | `the run succeeds`, `the run fails`, `the run fails with {string}` | Expects the run to finish, or to fail (with that error code, such as `"approval_rejected"`)
|
|
475
|
+
| Keyword | Step | What it does |
|
|
476
|
+
| ------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
477
|
+
| Given | `{op} was called with` and a JSON doc string or a two-column table (`name \| value`) | Seeds the fake: calls the operation through it before the run |
|
|
478
|
+
| Given | `{op} fails once`, `{op} is rate limited once`, `{op} loses its reply once` | Injects the fault into the operation's next call (`failNext`, `rateLimit`, `loseReply`); its step has `fault: true` |
|
|
479
|
+
| Given | `{resource} {string} has` and a two-column table (`field \| value`) or a JSON doc string | The vendor's fake holds the object with these fields: `Given github.repository "website" has` then `\| has_wiki \| true \|` |
|
|
480
|
+
| Given | `{resource} {string} is gone` | The vendor's fake no longer holds the object: `Given github.repository "docs" is gone` |
|
|
481
|
+
| Given | `{who} is acting` | Starts the run as that declared person or agent: `Given refund-bot is acting` (else `runScenario`'s `startedBy`, `scenarios` by default) |
|
|
482
|
+
| When | `{workflow} runs with` and a JSON doc string or a two-column table (`name \| value`) | The workflow the scenario runs, and its input |
|
|
483
|
+
| When | `{workflow} runs` | The same, with the input made up |
|
|
484
|
+
| Any | `{string} is approved by {who}`, `… with note {string}`, and the `rejected` forms | How the approval with that title (or id, such as `approval-2`) is decided |
|
|
485
|
+
| Then | `{op} was called with` and a JSON doc string or a two-column table | Expects a call whose input has at least these fields, at any depth: an object may give some of its fields |
|
|
486
|
+
| Then | `{op} was called`, `{op} was not called` | Expects a call to the operation, or none |
|
|
487
|
+
| Then | `step {string} was called with` and a JSON doc string or a two-column table | Expects a call by the [step](#step-names) of that name whose input has at least these fields, at any depth: `Then step "Draft the post" was called with` |
|
|
488
|
+
| Then | `step {string} was called`, `step {string} was not called` | Expects the named step to have run, or not |
|
|
489
|
+
| Then | `step {string} ran {int} time(s)` | Expects the named step to have run that often: `Then step "Draft the post" ran 2 times` |
|
|
490
|
+
| Then | `{op} was denied` | Expects the policy to have denied a call to it: `Then github.repository.import was denied` |
|
|
491
|
+
| Then | `{op} was denied with {string}` | The same, with that reason (a Cedar policy's `@reason`): `Then shop.refunds.create was denied with "Agents do not refund"` |
|
|
492
|
+
| Then | `{op} was held for {who}` | Expects an approval for that approver to have held it: `Then stripe.product.import was held for finance` |
|
|
493
|
+
| Then | `{op} was held for group {string}` | The same, for the group alone, never a person of that id: `Then shop.refunds.create was held for group "finance"` |
|
|
494
|
+
| Then | `{declared} is drifted in {field}` | For a drift run: `Then resources/identity/github.ts#website is drifted in has_wiki` |
|
|
495
|
+
| Then | `{declared} is clean`, `{declared} is gone`, `{declared} is absent` | For a drift run: `Then resources/identity/github.ts#docs is clean` |
|
|
496
|
+
| Then | `apply creates {declared}` | For an apply run: it created the resource (or made a gone one again): `Then apply creates resources/identity/github.ts#docs` |
|
|
497
|
+
| Then | `{declared} is bound to {string}` | For an apply run: the lockfile it ended with binds it so: `Then resources/identity/rules.ts#docsMain is bound to "BPR_docs:main"` |
|
|
498
|
+
| Then | `the run succeeds`, `the run fails`, `the run fails with {string}` | Expects the run to finish, or to fail (with that error code, such as `"approval_rejected"`) |
|
|
497
499
|
|
|
498
500
|
A resource step names an object a vendor's fake holds, by resource type and import id (a binding id, or an identity: a GitHub repository's name, a branch protection rule's `repository:pattern`; a fake also finds an object by its binding id, such as a repository's `node_id`), for a fake that holds objects (`@sanoma-ai/bridge`'s `tfFake`, as the GitHub and Stripe fakes are; a sandbox run whose scenario seeds a resource of another vendor's fake fails with `invalid_input`). `has` puts the fields on the object (`put`: over the one the vendor has, keeping its other fields, or a new one), each read as a table cell is for an operation's input and checked against the type's schema; `is gone` removes it (`remove`), and is nothing when there is none. The run's own fake is what is seeded. A fake starts a sandbox run with what its replies were recorded with, so a declared resource the recording lacks is `gone` to a drift run until a scenario puts it.
|
|
499
501
|
|
|
@@ -505,7 +507,7 @@ Cucumber matches a step by its text alone, whatever its keyword; Sanoma then pic
|
|
|
505
507
|
|
|
506
508
|
Each scenario has exactly one `When … runs`. An operation can add its own steps with `phrases` in its spec: `{ given: "a post titled {title} exists", expect: "a post titled {title} is created" }`. Each `{name}` is a field of the operation's input (a phrase naming another is a configuration error); it matches what `{string}` does (a quoted string) or one word, and is read as a table cell is. A field may have any name, even one a parameter type has (`op`, `string`, `int`): the phrase reads it as the field. A `given` phrase seeds the fake as `was called with` does, and an `expect` phrase (for `Then` steps) expects a call with those fields. `describeConfig` lists them as an operation's `phrases`.
|
|
507
509
|
|
|
508
|
-
A doc string is a JSON object. A table cell, and a phrase's field, is read as text when its field takes text, else as JSON (a number, `true`, a list): `| title | 123 |` is the text `"123"` for a string field, and `| count | 5 |` the number 5 for a number field. Every field a doc string or a table names must be one the input has (the error lists those it has), and its value one the field takes; a value it takes neither as text nor as JSON, such as `yes` for a boolean, is an error. A `Then` checks each field it names this way, not the whole input.
|
|
510
|
+
A doc string is a JSON object. A table cell, and a phrase's field, is read as text when its field takes text, else as JSON (a number, `true`, a list): `| title | 123 |` is the text `"123"` for a string field, and `| count | 5 |` the number 5 for a number field. Every field a doc string or a table names must be one the input has (the error lists those it has), and its value one the field takes; a value it takes neither as text nor as JSON, such as `yes` for a boolean, is an error. A `Then` checks each field it names this way, not the whole input, and at any depth: an object it gives (in an object field, optional or nullable too) may name some of its fields (`{ "record": { "stage": "won" } }`), each checked against its own schema (`stage in record in data.outbound.save's input cannot be …`), where a `Given`, which seeds a call, needs the whole object; a list, and an object in a list or a union, is given whole. So does an `expect` phrase's field.
|
|
509
511
|
|
|
510
512
|
Input the scenario leaves out is made up from the schema with [zod-schema-faker](https://github.com/soc221b/zod-schema-faker), seeded from the scenario's name, so one scenario always makes up the same values; it is then parsed by the schema. A step no rule matches, or more than one, an unknown operation, workflow or field, a value its field does not take, a missing or second `When`, a doc string that is not JSON, and a file Gherkin cannot parse are errors naming the file and line; the first lists every step there is, each operation's phrases under its id and each connector's steps under its vendor. A file with an error has none of its scenarios; the other files still load.
|
|
511
513
|
|
|
@@ -538,7 +540,7 @@ The same steps test the connector's own operations, in its `features/`: there th
|
|
|
538
540
|
| Keyword | Step | What it does |
|
|
539
541
|
| ------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
540
542
|
| When | `{op} is called with` and a JSON doc string or a two-column table | Calls the operation with that input, the rest made up; the call and its output or error are kept |
|
|
541
|
-
| Then | `it returns` and a two-column table of fields of its output | Expects the last call to have returned at least these fields
|
|
543
|
+
| Then | `it returns` and a two-column table of fields of its output | Expects the last call to have returned at least these fields, at any depth |
|
|
542
544
|
| Then | `it fails with status {int}` | Expects the last call to have failed with that vendor status |
|
|
543
545
|
|
|
544
546
|
A workflow's scenario refuses `{op} is called with`, and an operation's own test refuses a step that runs a workflow, decides an approval or seeds a resource; a fault needs the fake.
|
package/dist/define.d.ts
CHANGED
|
@@ -172,7 +172,10 @@ interface AllCtx {
|
|
|
172
172
|
}>;
|
|
173
173
|
}
|
|
174
174
|
interface BaseCtx {
|
|
175
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* The current time in epoch milliseconds, recorded so replays see the same value. Use instead
|
|
177
|
+
* of `Date.now()`, which the lint refuses; a date is `new Date(await ctx.now()).toISOString()`.
|
|
178
|
+
*/
|
|
176
179
|
now(): Promise<number>;
|
|
177
180
|
readonly runId: string;
|
|
178
181
|
}
|
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAA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wGAAwG;AACxG,MAAM,UAAU,UAAU,CAAC,MAA0B;IACnD,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,IAAI,SAAS,CAAC;IAC7D,IAAI,CAAC;QACH,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/dist/describe.d.ts
CHANGED
|
@@ -179,3 +179,5 @@ export interface ConfigDescription {
|
|
|
179
179
|
* code is read too (`readSites`): what each calls, and its calls to what the config lacks as its problems.
|
|
180
180
|
*/
|
|
181
181
|
export declare function describeConfig(config: SanomaConfig): ConfigDescription;
|
|
182
|
+
/** A logo's SVG markup as a `data:` URL, for an `<img>`. */
|
|
183
|
+
export declare const svgDataUrl: (svg: string) => string;
|
package/dist/describe.js
CHANGED
|
@@ -177,7 +177,8 @@ function memoised(fn) {
|
|
|
177
177
|
return seen.get(arg);
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
/** A logo's SVG markup as a `data:` URL, for an `<img>`. */
|
|
181
|
+
export const svgDataUrl = (svg) => `data:image/svg+xml,${encodeURIComponent(svg.trim())}`;
|
|
181
182
|
const vendorEntry = (id, info, fake) => ({
|
|
182
183
|
title: info?.title ?? id,
|
|
183
184
|
...(info?.logo && {
|
package/dist/describe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../src/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,UAAU,EAAmB,MAAM,UAAU,CAAC;AACzE,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AACrF,OAAO,EAAgB,YAAY,EAAE,OAAO,EAAY,MAAM,aAAa,CAAC;AAC5E,OAAO,EA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AI,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;KACtG,CAAC;IACF,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;IAC/C,GAAG,CAAC,IAAI,EAAE,QAAQ,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClD,IAAI;CACL,CAAC,CAAC;AAEH,6DAA6D;AAC7D,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,wBAAwB,EAAE,EAAE,CAAC;AAErE,SAAS,YAAY,CACnB,MAAiB,EACjB,IAAY,EACZ,EAAsB,EACtB,IAAmC;IAEnC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,oBAAqB,CAAW,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACnG,CAAC;AACH,CAAC"}
|
package/dist/fill.d.ts
CHANGED
|
@@ -5,5 +5,9 @@ export declare const seedFrom: (name: string) => void;
|
|
|
5
5
|
export declare function fill(schema: z.ZodType, given: Record<string, unknown>): unknown;
|
|
6
6
|
/** An object schema's fields by name; none for any other schema. */
|
|
7
7
|
export declare const shapeOf: (schema: z.ZodType) => Record<string, z.ZodType>;
|
|
8
|
+
/** The schema of a field an object schema does not name, when it takes such fields (`z.looseObject`, `.catchall`). */
|
|
9
|
+
export declare function restOf(schema: z.ZodType): z.ZodType | undefined;
|
|
10
|
+
/** The object schema under `schema`'s optional, nullable and default wrappers, if it is one. */
|
|
11
|
+
export declare function objectUnder(schema: z.ZodType): z.ZodObject | undefined;
|
|
8
12
|
/** A mistake in code (ours, or a fake's), not in what it was given: thrown as it is, never reported as data. */
|
|
9
13
|
export declare const isBug: (err: unknown) => err is RangeError | ReferenceError | TypeError;
|
package/dist/fill.js
CHANGED
|
@@ -12,6 +12,19 @@ export function fill(schema, given) {
|
|
|
12
12
|
}
|
|
13
13
|
/** An object schema's fields by name; none for any other schema. */
|
|
14
14
|
export const shapeOf = (schema) => schema instanceof z.ZodObject ? schema.shape : {};
|
|
15
|
+
/** The schema of a field an object schema does not name, when it takes such fields (`z.looseObject`, `.catchall`). */
|
|
16
|
+
export function restOf(schema) {
|
|
17
|
+
const rest = schema instanceof z.ZodObject ? schema.def.catchall : undefined;
|
|
18
|
+
return rest instanceof z.ZodNever ? undefined : rest;
|
|
19
|
+
}
|
|
20
|
+
/** The object schema under `schema`'s optional, nullable and default wrappers, if it is one. */
|
|
21
|
+
export function objectUnder(schema) {
|
|
22
|
+
let inner = schema;
|
|
23
|
+
while (inner instanceof z.ZodOptional || inner instanceof z.ZodNullable || inner instanceof z.ZodDefault) {
|
|
24
|
+
inner = inner.unwrap();
|
|
25
|
+
}
|
|
26
|
+
return inner instanceof z.ZodObject ? inner : undefined;
|
|
27
|
+
}
|
|
15
28
|
/** A mistake in code (ours, or a fake's), not in what it was given: thrown as it is, never reported as data. */
|
|
16
29
|
export const isBug = (err) => err instanceof TypeError || err instanceof RangeError || err instanceof ReferenceError;
|
|
17
30
|
//# sourceMappingURL=fill.js.map
|
package/dist/fill.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill.js","sourceRoot":"","sources":["../src/fill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB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AAG,YAAY,SAAS,IAAI,GAAG,YAAY,UAAU,IAAI,GAAG,YAAY,cAAc,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { type CallContext, type Connector, type ConnectorSetup, type ConnectorVendor, type Driver, type DriverEnv, type DriverFn, defineConnector, DriverError, type Effect, isOp, type Op, type OpSpec, type ResourceGroup, retryableStatus, type VendorInfo, withSetup, } from "./op.ts";
|
|
1
|
+
export { type CallContext, type Connector, type ConnectorSetup, type ConnectorVendor, type Driver, type DriverEnv, type DriverFn, defineConnector, DriverError, type Effect, isOp, isSvgElement, type Op, type OpSpec, type ResourceGroup, retryableStatus, type VendorInfo, withSetup, } from "./op.ts";
|
|
2
|
+
export { SanomaPackageField, vendorInfo } from "./vendor-info.ts";
|
|
2
3
|
export { defineWorkflow, Principal, type ApprovalRequest, type ApprovalResult, type ApprovalState, type Approver, type Builtin, type Ctx, type SleepRequest, type StepOptions, type Use, type WorkflowDefinition, } from "./define.ts";
|
|
3
4
|
export { compareDeclared, type Declared, type Declaring, defineResource, diffDeclared, type FieldReference, type PlanAction, type References, type Resource, type ResourceFields, type ResourceOps, type ResourceSpec, withoutWriteOnly, } from "./resource.ts";
|
|
4
5
|
export { defineConfig, resolveConfig, resolveDatabaseUrl, type ResolvedConfig, type SanomaConfig } from "./config.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { defineConnector, DriverError, isOp, retryableStatus, withSetup, } from "./op.js";
|
|
1
|
+
export { defineConnector, DriverError, isOp, isSvgElement, retryableStatus, withSetup, } from "./op.js";
|
|
2
|
+
export { SanomaPackageField, vendorInfo } from "./vendor-info.js";
|
|
2
3
|
export { defineWorkflow, Principal, } from "./define.js";
|
|
3
4
|
export { compareDeclared, defineResource, diffDeclared, withoutWriteOnly, } from "./resource.js";
|
|
4
5
|
export { defineConfig, resolveConfig, resolveDatabaseUrl } from "./config.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,eAAe,EACf,WAAW,EAEX,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,eAAe,EACf,WAAW,EAEX,IAAI,EACJ,YAAY,EAIZ,eAAe,EAEf,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,SAAS,GAWV,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EAGf,cAAc,EACd,YAAY,EAQZ,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAA0C,MAAM,aAAa,CAAC;AACtH,2GAA2G;AAC3G,gIAAgI;AAChI,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAyB,aAAa,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EACL,cAAc,EACd,UAAU,GAMX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,cAAc,GAMf,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EAEX,IAAI,EAIJ,UAAU,GAIX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EAEX,YAAY,EACZ,YAAY,EAEZ,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,SAAS,EAIT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,GAKf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAmC,MAAM,aAAa,CAAC;AAC3E,qGAAqG;AACrG,OAAO,EACL,cAAc,EACd,QAAQ,EACR,aAAa,EAEb,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAe,MAAM,aAAa,CAAC;AAE3E,OAAO,EAEL,YAAY,GAKb,MAAM,aAAa,CAAC;AACrB,4FAA4F;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,4EAA4E;AAC5E,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,cAAc,EAEd,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,OAAO,EACP,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,GAEb,MAAM,aAAa,CAAC;AACrB,kFAAkF;AAClF,kGAAkG;AAClG,uDAAuD;AACvD,OAAO,EAAE,YAAY,EAAgC,MAAM,SAAS,CAAC;AACrE,6FAA6F;AAC7F,OAAO,EAAE,WAAW,EAAoD,MAAM,YAAY,CAAC;AAC3F,8EAA8E"}
|
package/dist/op.d.ts
CHANGED
|
@@ -131,6 +131,8 @@ export interface VendorInfo {
|
|
|
131
131
|
/** The connector package's `homepage` from its package.json: where its code and README are, as an https URL. */
|
|
132
132
|
homepage?: string;
|
|
133
133
|
}
|
|
134
|
+
/** Whether `svg` is a logo as `VendorInfo` takes it: one `<svg>…</svg>` element. */
|
|
135
|
+
export declare const isSvgElement: (svg: unknown) => svg is string;
|
|
134
136
|
/**
|
|
135
137
|
* Declares a vendor's operations, grouped by resource: `defineConnector("ghost", { post: { create: {...} } })`.
|
|
136
138
|
* A group may be a resource type from `defineResource`, under its own `type`, for its `read` and
|
package/dist/op.js
CHANGED
|
@@ -17,8 +17,10 @@ export const VENDOR = Symbol.for("sanoma.vendor");
|
|
|
17
17
|
* the record, so a build refuses a connector another build made in another shape.
|
|
18
18
|
*/
|
|
19
19
|
export const CONNECTOR_FORMAT = 1;
|
|
20
|
-
/** One `<svg>` element, with nothing but whitespace around it. */
|
|
20
|
+
/** One `<svg>` element, with nothing but whitespace around it: what a logo must be. */
|
|
21
21
|
const SVG_ELEMENT = /^\s*<svg[\s>][\s\S]*<\/svg>\s*$/;
|
|
22
|
+
/** Whether `svg` is a logo as `VendorInfo` takes it: one `<svg>…</svg>` element. */
|
|
23
|
+
export const isSvgElement = (svg) => typeof svg === "string" && SVG_ELEMENT.test(svg);
|
|
22
24
|
const isResourceGroup = (group) => (typeof group === "function" || typeof group === "object") &&
|
|
23
25
|
group !== null &&
|
|
24
26
|
group[RESOURCE] === true;
|
|
@@ -35,7 +37,7 @@ export function defineConnector(vendor, specs, info) {
|
|
|
35
37
|
// A copy, frozen once checked: changing the caller's object later cannot slip a logo past the check.
|
|
36
38
|
const logo = info?.logo && Object.freeze(Object.fromEntries(Object.entries(info.logo).filter(([, v]) => v !== undefined)));
|
|
37
39
|
for (const [variant, svg] of Object.entries(logo ?? {})) {
|
|
38
|
-
if (
|
|
40
|
+
if (!isSvgElement(svg)) {
|
|
39
41
|
throw new Error(`defineConnector("${vendor}"): logo.${variant} must be inline SVG markup, one <svg>…</svg> element`);
|
|
40
42
|
}
|
|
41
43
|
}
|
package/dist/op.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op.js","sourceRoot":"","sources":["../src/op.ts"],"names":[],"mappings":"AA4DA;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkB,MAAM,CAAC,GAAG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AAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACrG,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAM,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1F,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACtG,CAAC"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
interface Context {
|
|
2
2
|
filename: string;
|
|
3
|
+
sourceCode: {
|
|
4
|
+
isGlobalReference(node: Node): boolean;
|
|
5
|
+
};
|
|
3
6
|
report(diagnostic: {
|
|
4
7
|
message: string;
|
|
5
8
|
node: {
|
|
@@ -7,6 +10,20 @@ interface Context {
|
|
|
7
10
|
};
|
|
8
11
|
}): void;
|
|
9
12
|
}
|
|
13
|
+
/** A node of oxlint's ESTree, by the little the `date` rule reads. */
|
|
14
|
+
interface Node {
|
|
15
|
+
type: string;
|
|
16
|
+
range: [number, number];
|
|
17
|
+
parent?: Node;
|
|
18
|
+
name?: string;
|
|
19
|
+
callee?: Node;
|
|
20
|
+
object?: Node;
|
|
21
|
+
property?: Node;
|
|
22
|
+
computed?: boolean;
|
|
23
|
+
arguments?: Node[];
|
|
24
|
+
operator?: string;
|
|
25
|
+
right?: Node;
|
|
26
|
+
}
|
|
10
27
|
declare const plugin: {
|
|
11
28
|
meta: {
|
|
12
29
|
name: string;
|
|
@@ -23,6 +40,17 @@ declare const plugin: {
|
|
|
23
40
|
Program(program: unknown): void;
|
|
24
41
|
};
|
|
25
42
|
};
|
|
43
|
+
date: {
|
|
44
|
+
meta: {
|
|
45
|
+
type: string;
|
|
46
|
+
docs: {
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
create(context: Context): {
|
|
51
|
+
Identifier(node: Node): void;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
26
54
|
};
|
|
27
55
|
};
|
|
28
56
|
export default plugin;
|
package/dist/plugin.js
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
import { readDataFile } from "./datafile.js";
|
|
2
|
+
const DATE_MESSAGE = "Workflows are replayed, so a workflow reads the clock with `await ctx.now()`, never `Date`: `new Date(await ctx.now())` for a date, `new Date(value)`, `Date.parse` or `Date.UTC` for one it has, and `ctx.sleep({ until })` to wait for a date.";
|
|
3
|
+
/** Where `Date` names the type, which the build erases: `d: Date`, `typeof Date`, `implements Date`. */
|
|
4
|
+
const TYPE_PARENTS = new Set([
|
|
5
|
+
"TSTypeReference",
|
|
6
|
+
"TSTypeQuery",
|
|
7
|
+
"TSQualifiedName",
|
|
8
|
+
"TSClassImplements",
|
|
9
|
+
"TSInterfaceHeritage",
|
|
10
|
+
]);
|
|
11
|
+
/** `Date`'s functions that read no clock. */
|
|
12
|
+
const PURE = new Set(["parse", "UTC"]);
|
|
13
|
+
/**
|
|
14
|
+
* Whether `Date` (`node`) reads no clock where it is: `new Date(value)`, `Date.parse(…)`,
|
|
15
|
+
* `Date.UTC(…)`, `x instanceof Date`, or a type. A node without its parent is reported.
|
|
16
|
+
*/
|
|
17
|
+
function readsNoClock(node) {
|
|
18
|
+
const { parent } = node;
|
|
19
|
+
if (!parent)
|
|
20
|
+
return false;
|
|
21
|
+
if (TYPE_PARENTS.has(parent.type))
|
|
22
|
+
return true;
|
|
23
|
+
if (parent.type === "BinaryExpression")
|
|
24
|
+
return parent.operator === "instanceof" && parent.right === node;
|
|
25
|
+
if (parent.type === "NewExpression" && parent.callee === node) {
|
|
26
|
+
const [first] = parent.arguments ?? [];
|
|
27
|
+
return first !== undefined && first.type !== "SpreadElement";
|
|
28
|
+
}
|
|
29
|
+
return (parent.type === "MemberExpression" &&
|
|
30
|
+
parent.object === node &&
|
|
31
|
+
!parent.computed &&
|
|
32
|
+
PURE.has(parent.property?.name ?? ""));
|
|
33
|
+
}
|
|
2
34
|
const plugin = {
|
|
3
35
|
meta: { name: "sanoma" },
|
|
4
36
|
rules: {
|
|
@@ -19,6 +51,25 @@ const plugin = {
|
|
|
19
51
|
};
|
|
20
52
|
},
|
|
21
53
|
},
|
|
54
|
+
// `Date` reads the clock in `Date.now()`, `new Date()` and `Date()`, which a replay would read
|
|
55
|
+
// again; a workflow reads it with `ctx.now()`, recorded. Every other use of `Date` is pure:
|
|
56
|
+
// `new Date(value)` (of `await ctx.now()`, or of a date the workflow has), `Date.parse`, `Date.UTC`.
|
|
57
|
+
date: {
|
|
58
|
+
meta: {
|
|
59
|
+
type: "problem",
|
|
60
|
+
docs: { description: "A workflow reads the clock with `await ctx.now()`, never `Date`" },
|
|
61
|
+
},
|
|
62
|
+
create(context) {
|
|
63
|
+
return {
|
|
64
|
+
Identifier(node) {
|
|
65
|
+
if (node.name !== "Date" || readsNoClock(node))
|
|
66
|
+
return;
|
|
67
|
+
if (context.sourceCode.isGlobalReference(node))
|
|
68
|
+
context.report({ message: DATE_MESSAGE, node });
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
},
|
|
22
73
|
},
|
|
23
74
|
};
|
|
24
75
|
export default plugin;
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pl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