@tolki/enum 0.0.3 → 0.0.5
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 +52 -1
- package/dist/enums.d.ts +5 -4
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +7 -7
- package/dist/vite-plugin.d.ts +38 -0
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.js +69 -56
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,8 +146,28 @@ By default, the plugin will work in the following way:
|
|
|
146
146
|
2. It will look for the list of transformed PHP files here: `resources/js/types/laravel-ts-collected-files.json`.
|
|
147
147
|
3. If that manifest file changes, it will reload the watched file list without calling the publish command again.
|
|
148
148
|
4. It will reload the page after a successful publish triggered by a watched PHP file change.
|
|
149
|
-
5. It will call the publish command on `vite build` before bundling.
|
|
149
|
+
5. It will call the publish command on `vite build` before bundling, with `--only-enums` appended by default (since model interfaces are type-only and erased at compile time).
|
|
150
150
|
6. It will throw an error if the publish command fails on `vite build`.
|
|
151
|
+
7. When a single PHP file changes during `vite dev`, it will use `--source` to republish only that file instead of running a full publish.
|
|
152
|
+
8. It will append `--quiet` to every command by default, suppressing all console output since the plugin only needs the exit code.
|
|
153
|
+
|
|
154
|
+
#### Single-File Republishing
|
|
155
|
+
|
|
156
|
+
The JSON file list manifest uses the `filepath[]` array format (produced by `laravel-ts-publish`), the plugin will automatically use the `--source` flag to republish only the changed file during development:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Instead of running the full command:
|
|
160
|
+
php artisan ts:publish
|
|
161
|
+
|
|
162
|
+
# The plugin runs a targeted command:
|
|
163
|
+
php artisan ts:publish --source="app/Enums/Status.php"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
This can reduce per-change latency from seconds to near-instant on large projects with hundreds of files.
|
|
167
|
+
|
|
168
|
+
The plugin derives the source command automatically from the `command` option by appending `--source="{file}"`. You can customize this with the `sourceCommand` option or disable it entirely by setting `sourceCommand: false`.
|
|
169
|
+
|
|
170
|
+
Full startup commands (`runOnDevStart`, `runOnBuildStart`) always use the full `command` to ensure all files are generated.
|
|
151
171
|
|
|
152
172
|
#### Manifest Updates
|
|
153
173
|
|
|
@@ -217,6 +237,37 @@ export default defineConfig({
|
|
|
217
237
|
* When specified, it will apply to both `vite dev` and `vite build`.
|
|
218
238
|
*/
|
|
219
239
|
failOnError: undefined,
|
|
240
|
+
/**
|
|
241
|
+
* The command template for single-file republishing during `vite dev`.
|
|
242
|
+
*
|
|
243
|
+
* When a watched PHP file changes, this command is used instead of the
|
|
244
|
+
* full `command`. The `{file}` placeholder is replaced with the relative
|
|
245
|
+
* file path from the manifest for the changed file (exactly as it
|
|
246
|
+
* appears in the manifest array).
|
|
247
|
+
*
|
|
248
|
+
* When not specified, it is auto-derived by appending
|
|
249
|
+
* ` --source="{file}"` to the `command` option.
|
|
250
|
+
*
|
|
251
|
+
* Set to `false` to always run the full command.
|
|
252
|
+
*/
|
|
253
|
+
sourceCommand: 'php artisan ts:publish --source="{file}"',
|
|
254
|
+
/**
|
|
255
|
+
* Whether to append `--only-enums` to the command during `vite build`.
|
|
256
|
+
*
|
|
257
|
+
* Model interfaces are type-only and erased at compile time, so
|
|
258
|
+
* generating them during production builds is unnecessary.
|
|
259
|
+
*
|
|
260
|
+
* Has no effect during `vite dev`.
|
|
261
|
+
*/
|
|
262
|
+
onBuildOnlyEnums: true,
|
|
263
|
+
/**
|
|
264
|
+
* Whether to append `--quiet` to every artisan command the plugin runs.
|
|
265
|
+
*
|
|
266
|
+
* The plugin only needs the exit code to determine success or failure;
|
|
267
|
+
* all stdout is ignored. Passing `--quiet` suppresses console output
|
|
268
|
+
* and Laravel Prompts rendering, which speeds up execution.
|
|
269
|
+
*/
|
|
270
|
+
quiet: true,
|
|
220
271
|
}),
|
|
221
272
|
],
|
|
222
273
|
});
|
package/dist/enums.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CaseValue, DefineEnumResult, EnumConst,
|
|
1
|
+
import { AsEnum, CaseValue, DefineEnumResult, EnumConst, FromResult } from '../../types/src/index.ts';
|
|
2
|
+
export type { AsEnum, CaseValue, DefineEnumResult, EnumConst, FromResult };
|
|
2
3
|
/**
|
|
3
4
|
* Creates an enum instance from a case value similar to PHP's `BackedEnum::from()`
|
|
4
5
|
*
|
|
@@ -16,7 +17,7 @@ import { CaseValue, DefineEnumResult, EnumConst, ToEnumResult } from '../../type
|
|
|
16
17
|
* @returns The resolved enum case with its associated methods and properties for the value provided.
|
|
17
18
|
* @throws If the value does not match any case in the enum, an error is thrown.
|
|
18
19
|
*/
|
|
19
|
-
export declare function from<TEnum extends EnumConst, const TValue extends CaseValue<TEnum>>(enumObj: TEnum, value: TValue):
|
|
20
|
+
export declare function from<TEnum extends EnumConst, const TValue extends CaseValue<TEnum>>(enumObj: TEnum, value: TValue): FromResult<TEnum, TValue>;
|
|
20
21
|
/**
|
|
21
22
|
* Similar to the {@linkcode from | from} function but returns null instead of throwing an error for invalid values.
|
|
22
23
|
*
|
|
@@ -28,7 +29,7 @@ export declare function from<TEnum extends EnumConst, const TValue extends CaseV
|
|
|
28
29
|
* @param value - The case value to resolve.
|
|
29
30
|
* @returns The resolved enum case, or null if the value does not match any case.
|
|
30
31
|
*/
|
|
31
|
-
export declare function tryFrom<TEnum extends EnumConst, const TValue extends CaseValue<TEnum>>(enumObj: TEnum, value: TValue):
|
|
32
|
+
export declare function tryFrom<TEnum extends EnumConst, const TValue extends CaseValue<TEnum>>(enumObj: TEnum, value: TValue): FromResult<TEnum, TValue> | null;
|
|
32
33
|
/**
|
|
33
34
|
* Returns all enum cases as resolved instances by running each case value through the {@linkcode from | from} function.
|
|
34
35
|
*
|
|
@@ -39,7 +40,7 @@ export declare function tryFrom<TEnum extends EnumConst, const TValue extends Ca
|
|
|
39
40
|
* @param enumObj - The enum const object to resolve all cases from.
|
|
40
41
|
* @returns An array of resolved enum instances, one for each case.
|
|
41
42
|
*/
|
|
42
|
-
export declare function cases<TEnum extends EnumConst>(enumObj: TEnum): Array<
|
|
43
|
+
export declare function cases<TEnum extends EnumConst>(enumObj: TEnum): Array<FromResult<TEnum, CaseValue<TEnum>>>;
|
|
43
44
|
/**
|
|
44
45
|
* Factory function that creates an enriched enum object
|
|
45
46
|
*
|
package/dist/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,UAAU,EACb,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,IAAI,CAChB,KAAK,SAAS,SAAS,EACvB,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC,KAAK,CAAC,EACvC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CA8C1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CACnB,KAAK,SAAS,SAAS,EACvB,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC,KAAK,CAAC,EACvC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAMjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,SAAS,EACzC,OAAO,EAAE,KAAK,GACf,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAI5C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,KAAK,SAAS,SAAS,EACpD,OAAO,EAAE,KAAK,GACf,gBAAgB,CAAC,KAAK,CAAC,CA2BzB"}
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function a(e, t) {
|
|
2
|
-
const n = new Set(e._cases);
|
|
2
|
+
const n = new Set(e._cases ?? []);
|
|
3
3
|
let r;
|
|
4
4
|
for (const s of n)
|
|
5
5
|
if (e[s] === t) {
|
|
@@ -7,12 +7,12 @@ function a(e, t) {
|
|
|
7
7
|
break;
|
|
8
8
|
}
|
|
9
9
|
if (!r) {
|
|
10
|
-
const s = Array.from(n).map((
|
|
10
|
+
const s = Array.from(n).map((c) => e[c]);
|
|
11
11
|
throw new Error(
|
|
12
12
|
`Value "${String(t)}" does not match any case in the enum. Values: ${s.join(", ")}, Cases: ${[...n].join(", ")}`
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const o = { value: t }, h = new Set(e._methods ?? []), i = e._helpers, f = new Set(
|
|
16
16
|
Array.isArray(i) ? i : []
|
|
17
17
|
), l = /* @__PURE__ */ new Set([
|
|
18
18
|
"_cases",
|
|
@@ -20,9 +20,9 @@ function a(e, t) {
|
|
|
20
20
|
"_helpers",
|
|
21
21
|
"_static"
|
|
22
22
|
]);
|
|
23
|
-
for (const [s,
|
|
24
|
-
l.has(s) || n.has(s) || f.has(s) || (h.has(s) ?
|
|
25
|
-
return
|
|
23
|
+
for (const [s, c] of Object.entries(e))
|
|
24
|
+
l.has(s) || n.has(s) || f.has(s) || (h.has(s) ? o[s] = c[r] : o[s] = c);
|
|
25
|
+
return o.name = r, o;
|
|
26
26
|
}
|
|
27
27
|
function y(e, t) {
|
|
28
28
|
try {
|
|
@@ -32,7 +32,7 @@ function y(e, t) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function p(e) {
|
|
35
|
-
return e._cases.map(
|
|
35
|
+
return (e._cases ?? []).map(
|
|
36
36
|
(t) => a(e, e[t])
|
|
37
37
|
);
|
|
38
38
|
}
|
package/dist/vite-plugin.d.ts
CHANGED
|
@@ -59,6 +59,44 @@ export interface LaravelTsPublishOptions {
|
|
|
59
59
|
* during `vite dev`.
|
|
60
60
|
*/
|
|
61
61
|
failOnError?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The command template for single-file republishing during `vite dev`.
|
|
64
|
+
*
|
|
65
|
+
* When a watched PHP file changes, this command is used instead of the
|
|
66
|
+
* full `command` to republish only the changed file. The `{file}`
|
|
67
|
+
* placeholder is replaced with the relative file path from the manifest.
|
|
68
|
+
*
|
|
69
|
+
* When not specified, it is auto-derived by appending
|
|
70
|
+
* ` --source="{file}"` to the `command` option.
|
|
71
|
+
*
|
|
72
|
+
* Set to `false` to disable single-file republishing and always run
|
|
73
|
+
* the full command.
|
|
74
|
+
*
|
|
75
|
+
* @default Derived from the `command` option: 'php artisan ts:publish --source="{file}"'
|
|
76
|
+
*/
|
|
77
|
+
sourceCommand?: string | false;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to append `--only-enums` to the command during `vite build`.
|
|
80
|
+
*
|
|
81
|
+
* Model interfaces are type-only and erased at compile time, so generating
|
|
82
|
+
* them during production builds is unnecessary. When `true`, the build
|
|
83
|
+
* command becomes e.g. `php artisan ts:publish --only-enums`.
|
|
84
|
+
*
|
|
85
|
+
* Has no effect during `vite dev`.
|
|
86
|
+
*
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
onBuildOnlyEnums?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether to append `--quiet` to every artisan command the plugin runs.
|
|
92
|
+
*
|
|
93
|
+
* The plugin only needs the exit code to determine success or failure;
|
|
94
|
+
* all stdout is ignored. Passing `--quiet` suppresses console output
|
|
95
|
+
* and Laravel Prompts rendering, which speeds up execution.
|
|
96
|
+
*
|
|
97
|
+
* @default true
|
|
98
|
+
*/
|
|
99
|
+
quiet?: boolean;
|
|
62
100
|
}
|
|
63
101
|
/**
|
|
64
102
|
* Vite plugin that watches PHP source files listed in the Laravel TypeScript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,MAAM,EAGd,MAAM,MAAM,CAAC;AAId,MAAM,WAAW,uBAAuB;IACpC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,MAAM,EAGd,MAAM,MAAM,CAAC;AAId,MAAM,WAAW,uBAAuB;IACpC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,GAAE,uBAA4B,GACtC,MAAM,CAkOR"}
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,99 +1,112 @@
|
|
|
1
|
-
import { exec as
|
|
2
|
-
import { readFile as
|
|
3
|
-
import
|
|
4
|
-
import { promisify as
|
|
5
|
-
import { normalizePath as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
1
|
+
import { exec as F } from "node:child_process";
|
|
2
|
+
import { readFile as M } from "node:fs/promises";
|
|
3
|
+
import C from "node:path";
|
|
4
|
+
import { promisify as N } from "node:util";
|
|
5
|
+
import { normalizePath as g } from "vite";
|
|
6
|
+
const R = N(F);
|
|
7
|
+
function H(E = {}) {
|
|
8
8
|
const {
|
|
9
|
-
command:
|
|
10
|
-
filename:
|
|
11
|
-
directory:
|
|
12
|
-
runOnDevStart:
|
|
13
|
-
runOnBuildStart:
|
|
14
|
-
reload:
|
|
15
|
-
failOnError:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
command: s = "php artisan ts:publish",
|
|
10
|
+
filename: O = "laravel-ts-collected-files.json",
|
|
11
|
+
directory: S = "resources/js/types/",
|
|
12
|
+
runOnDevStart: q = !1,
|
|
13
|
+
runOnBuildStart: z = !0,
|
|
14
|
+
reload: P = !0,
|
|
15
|
+
failOnError: p,
|
|
16
|
+
sourceCommand: h,
|
|
17
|
+
onBuildOnlyEnums: T = !0,
|
|
18
|
+
quiet: w = !0
|
|
19
|
+
} = E, y = h === !1 ? !1 : h ?? `${s} --source="{file}"`;
|
|
20
|
+
let r, l;
|
|
21
|
+
const t = /* @__PURE__ */ new Map();
|
|
22
|
+
let u = "", m = !1;
|
|
23
|
+
const f = [], n = "[laravel-ts-publish]", v = async () => {
|
|
21
24
|
t.clear();
|
|
22
25
|
try {
|
|
23
|
-
const e = await
|
|
24
|
-
for (const
|
|
25
|
-
const
|
|
26
|
-
t.
|
|
26
|
+
const e = await M(u, "utf-8"), o = JSON.parse(e);
|
|
27
|
+
for (const c of o) {
|
|
28
|
+
const i = g(C.resolve(r.root, c));
|
|
29
|
+
t.set(i, c);
|
|
27
30
|
}
|
|
28
31
|
} catch (e) {
|
|
29
32
|
if (e instanceof Error && e.code === "ENOENT") {
|
|
30
33
|
r.logger.warn(
|
|
31
|
-
`${
|
|
34
|
+
`${n} Manifest not found: ${u}`
|
|
32
35
|
);
|
|
33
36
|
return;
|
|
34
37
|
}
|
|
35
38
|
r.logger.error(
|
|
36
|
-
`${
|
|
39
|
+
`${n} Failed to read manifest: ${e instanceof Error ? e.message : String(e)}`
|
|
37
40
|
);
|
|
38
41
|
}
|
|
39
|
-
},
|
|
40
|
-
if (
|
|
41
|
-
for (const e of t)
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
if (
|
|
45
|
-
f
|
|
42
|
+
}, $ = () => {
|
|
43
|
+
if (l)
|
|
44
|
+
for (const e of t.keys())
|
|
45
|
+
l.watcher.add(e);
|
|
46
|
+
}, x = () => p !== void 0 ? p : r.command === "build", d = async (e = null, o) => {
|
|
47
|
+
if (m) {
|
|
48
|
+
f.includes(e) || f.push(e);
|
|
46
49
|
return;
|
|
47
50
|
}
|
|
48
|
-
|
|
51
|
+
m = !0;
|
|
52
|
+
let i = e && y ? y.replaceAll("{file}", e) : o ?? s;
|
|
53
|
+
w && !i.includes("--quiet") && (i += " --quiet");
|
|
49
54
|
try {
|
|
50
|
-
r.logger.info(`${
|
|
55
|
+
r.logger.info(`${n} Running: ${i}`, {
|
|
51
56
|
timestamp: !0
|
|
52
|
-
}), await
|
|
57
|
+
}), await R(i, { cwd: r.root }), r.logger.info(`${n} Types published successfully`, {
|
|
53
58
|
timestamp: !0
|
|
54
|
-
}),
|
|
55
|
-
} catch (
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
throw new Error(
|
|
59
|
-
r.logger.error(
|
|
59
|
+
}), P && l && l.ws.send({ type: "full-reload" });
|
|
60
|
+
} catch (a) {
|
|
61
|
+
const b = `${n} Command failed: ${a instanceof Error ? a.message : String(a)}`;
|
|
62
|
+
if (x())
|
|
63
|
+
throw new Error(b, { cause: a });
|
|
64
|
+
r.logger.error(b);
|
|
60
65
|
} finally {
|
|
61
|
-
|
|
66
|
+
if (m = !1, f.length > 0) {
|
|
67
|
+
const a = f.shift();
|
|
68
|
+
await d(a);
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
};
|
|
64
72
|
return {
|
|
65
73
|
name: "@tolki/vite-plugin-laravel-ts-publish",
|
|
66
74
|
enforce: "pre",
|
|
67
75
|
configResolved(e) {
|
|
68
|
-
r = e,
|
|
69
|
-
|
|
76
|
+
r = e, u = g(
|
|
77
|
+
C.resolve(r.root, S, O)
|
|
70
78
|
);
|
|
71
79
|
},
|
|
72
80
|
configureServer(e) {
|
|
73
|
-
|
|
81
|
+
l = e;
|
|
74
82
|
},
|
|
75
83
|
async buildStart() {
|
|
76
84
|
if (r.command === "build") {
|
|
77
|
-
|
|
85
|
+
if (z) {
|
|
86
|
+
let e = T && !s.includes("--only-enums") ? `${s} --only-enums` : s;
|
|
87
|
+
w && !e.includes("--quiet") && (e += " --quiet"), await d(null, e);
|
|
88
|
+
}
|
|
78
89
|
return;
|
|
79
90
|
}
|
|
80
|
-
await
|
|
81
|
-
`${
|
|
91
|
+
await v(), $(), t.size > 0 && r.logger.info(
|
|
92
|
+
`${n} Watching ${t.size} PHP file${t.size === 1 ? "" : "s"} for changes`,
|
|
82
93
|
{ timestamp: !0 }
|
|
83
|
-
),
|
|
94
|
+
), q && await d();
|
|
84
95
|
},
|
|
85
96
|
async handleHotUpdate({ file: e }) {
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
97
|
+
const o = g(e);
|
|
98
|
+
if (o === u)
|
|
88
99
|
return r.logger.info(
|
|
89
|
-
`${
|
|
100
|
+
`${n} Manifest changed, reloading watched files`,
|
|
90
101
|
{ timestamp: !0 }
|
|
91
|
-
), await
|
|
92
|
-
if (t.has(
|
|
93
|
-
|
|
102
|
+
), await v(), $(), [];
|
|
103
|
+
if (t.has(o)) {
|
|
104
|
+
const c = t.get(o) ?? null;
|
|
105
|
+
return await d(c), [];
|
|
106
|
+
}
|
|
94
107
|
}
|
|
95
108
|
};
|
|
96
109
|
}
|
|
97
110
|
export {
|
|
98
|
-
|
|
111
|
+
H as laravelTsPublish
|
|
99
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolki/enum",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A set of enum utilities for the @tolki packages.",
|
|
5
5
|
"author": "Abraham Arango <https://github.com/abetwothree>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"utilities"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tolki/types": "^1.1.
|
|
26
|
+
"@tolki/types": "^1.1.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"vite": "^7.0.0"
|