@diagonal-hq/cli 0.41.4 → 0.41.6

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.
@@ -1,52 +0,0 @@
1
- import { createRequire as __diagonalCreateRequire } from 'node:module';
2
- const require = __diagonalCreateRequire(import.meta.url);
3
-
4
- // scripts/lib/workflow-script/constants.mjs
5
- var PROFILES = {
6
- workflow: {
7
- label: "A workflow script",
8
- imports: ["@diagonal/workflow", "@diagonal/workflow/workspace"],
9
- specifier: null,
10
- entry: null,
11
- defaultExports: ["defineWorkflow"]
12
- },
13
- test: {
14
- label: "A test script",
15
- imports: ["@diagonal/workflow", "@diagonal-hq/workflows/test", "@diagonal/workflow/workspace"],
16
- specifier: "@diagonal-hq/workflows/test",
17
- entry: "/sdk/profiles/test.ts",
18
- defaultExports: ["defineWorkflow"]
19
- }
20
- };
21
- var PROFILE_SPECIFIERS = new Set(
22
- Object.values(PROFILES).flatMap(({ specifier }) => specifier === null ? [] : [specifier])
23
- );
24
-
25
- // scripts/lib/runtime-build/string-facts.mjs
26
- var URL_PATTERN = /^[a-z][a-z0-9+.-]*:\/\//i;
27
- function isUrl(value) {
28
- return URL_PATTERN.test(value) && URL.canParse(value);
29
- }
30
- function isTimezone(value) {
31
- try {
32
- new Intl.DateTimeFormat("en-US", { timeZone: value });
33
- } catch (error) {
34
- if (error instanceof RangeError) {
35
- return false;
36
- }
37
- throw error;
38
- }
39
- return value.includes("/") || value === "UTC";
40
- }
41
- function stringFacts(strings) {
42
- const facts = /* @__PURE__ */ Object.create(null);
43
- for (const text of strings) {
44
- facts[text] = [isTimezone(text), isUrl(text), !Number.isNaN(Date.parse(text))];
45
- }
46
- return facts;
47
- }
48
-
49
- export {
50
- stringFacts,
51
- PROFILES
52
- };