@stacksjs/utils 0.53.1 → 0.56.23

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/dist/index.mjs CHANGED
@@ -1,15 +1,401 @@
1
- export * from "./base.mjs";
2
- export * from "./config.mjs";
3
- export * from "./currency.mjs";
4
- export * from "./debounce.mjs";
5
- export * from "./delete.mjs";
6
- export * from "./equal.mjs";
7
- export * from "./function.mjs";
8
- export * from "./guards.mjs";
9
- export * from "./helpers.mjs";
10
- export * from "./math.mjs";
11
- export * from "./p.mjs";
12
- export * from "./promise.mjs";
13
- export * from "./throttle.mjs";
14
- export * from "./vendors.mjs";
15
- export * from "./versions.mjs";
1
+ import { ui, app } from '@stacksjs/config';
2
+ export { loadStacksConfig as config } from '@stacksjs/config';
3
+ export { add, allocate, compare, convert, dinero as currency, dinero, equal, greaterThan, greaterThanOrEqual, hasSubUnits, haveSameAmount, haveSameCurrency, isZero, lessThan, lessThanOrEqual, maximum, minimum, dinero as money, multiply, normalizeScale, subtract, toDecimal, toSnapshot, toUnits, trimScale } from 'dinero.js';
4
+ export { USD } from '@dinero.js/currencies';
5
+ export { debounce } from 'perfect-debounce';
6
+ export { rimraf as del, rimraf } from 'rimraf';
7
+ import { projectPath, frameworkPath } from '@stacksjs/path';
8
+ import { parse } from 'yaml';
9
+ import { spawn, execSync, log, runCommand } from '@stacksjs/cli';
10
+ import * as storage from '@stacksjs/storage';
11
+ import * as semver from 'semver';
12
+ export { semver };
13
+ export { and, createGenericProjection, createProjection, logicNot, logicOr, not, or, useAbs, useAverage, useCeil, useClamp, useFloor, useMath, useMax, useMin, usePrecision, useProjection, useRound, useSum, useTrunc } from '@vueuse/math';
14
+ import pLimit from 'p-limit';
15
+ import { remove } from '@stacksjs/arrays';
16
+ export { asyncComputed, autoResetRef, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedEager, computedInject, computedWithControl, controlledComputed, controlledRef, createEventHook, createFetch, createGlobalState, createInjectionState, createReactiveFn, createReusableTemplate, createSharedComposable, createTemplatePromise, createUnrefFn, customStorageEventName, debouncedRef, debouncedWatch, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, eagerComputed, executeTransition, extendRef, formatTimeAgo, getSSRHandler, ignorableWatch, isDefined, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, syncRef, syncRefs, templateRef, throttledRef, throttledWatch, toReactive, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, unrefElement, until, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDateFormat, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useToggle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever } from '@vueuse/core';
17
+ export { Head, HeadVuePlugin, createHead, renderHeadToString } from '@vueuse/head';
18
+
19
+ function toString(v) {
20
+ return Object.prototype.toString.call(v);
21
+ }
22
+ function loop(times, callback) {
23
+ [...Array(times)].forEach((item, i) => callback(i));
24
+ }
25
+ function getTypeName(v) {
26
+ if (v === null)
27
+ return "null";
28
+ const type = toString(v).slice(8, -1).toLowerCase();
29
+ return typeof v === "object" || typeof v === "function" ? type : typeof v;
30
+ }
31
+
32
+ function defineApp(config) {
33
+ return config;
34
+ }
35
+ function defineCache(config) {
36
+ return config;
37
+ }
38
+ function defineCdn(config) {
39
+ return config;
40
+ }
41
+ function defineCli(config) {
42
+ return config;
43
+ }
44
+ function defineCronJobsConfig(config) {
45
+ return config;
46
+ }
47
+ function defineJobsConfig(config) {
48
+ return config;
49
+ }
50
+ function defineDatabase(config) {
51
+ return config;
52
+ }
53
+ function defineDebugConfig(config) {
54
+ return config;
55
+ }
56
+ function defineDns(config) {
57
+ return config;
58
+ }
59
+ function defineEmailConfig(config) {
60
+ return config;
61
+ }
62
+ function defineEvents(config) {
63
+ return config;
64
+ }
65
+ function defineGit(config) {
66
+ return config;
67
+ }
68
+ function defineHashing(config) {
69
+ return config;
70
+ }
71
+ function defineLibrary(config) {
72
+ return config;
73
+ }
74
+ function defineModel(config) {
75
+ return config;
76
+ }
77
+ function defineNotification(config) {
78
+ return config;
79
+ }
80
+ function defineSms(config) {
81
+ return config;
82
+ }
83
+ function defineEmail(config) {
84
+ return config;
85
+ }
86
+ function defineChat(config) {
87
+ return config;
88
+ }
89
+ function definePage(config) {
90
+ return config;
91
+ }
92
+ function definePayment(config) {
93
+ return config;
94
+ }
95
+ function defineQueue(config) {
96
+ return config;
97
+ }
98
+ function defineSearchEngine(config) {
99
+ return config;
100
+ }
101
+ function defineServices(config) {
102
+ return config;
103
+ }
104
+ function defineStorage(config) {
105
+ return config;
106
+ }
107
+ function defineUi(config) {
108
+ return config;
109
+ }
110
+
111
+ function isDeepEqual(value1, value2) {
112
+ const type1 = getTypeName(value1);
113
+ const type2 = getTypeName(value2);
114
+ if (type1 !== type2)
115
+ return false;
116
+ if (type1 === "array") {
117
+ if (value1.length !== value2.length)
118
+ return false;
119
+ return value1.every((item, i) => {
120
+ return isDeepEqual(item, value2[i]);
121
+ });
122
+ }
123
+ if (type1 === "object") {
124
+ const keyArr = Object.keys(value1);
125
+ if (keyArr.length !== Object.keys(value2).length)
126
+ return false;
127
+ return keyArr.every((key) => {
128
+ return isDeepEqual(value1[key], value2[key]);
129
+ });
130
+ }
131
+ return Object.is(value1, value2);
132
+ }
133
+
134
+ function batchInvoke(functions) {
135
+ functions.forEach((fn) => fn && fn());
136
+ }
137
+ function tap(value, callback) {
138
+ callback(value);
139
+ return value;
140
+ }
141
+
142
+ function notNullish(v) {
143
+ return v != null;
144
+ }
145
+ function noNull(v) {
146
+ return v !== null;
147
+ }
148
+ function notUndefined(v) {
149
+ return v !== void 0;
150
+ }
151
+ function isTruthy(v) {
152
+ return Boolean(v);
153
+ }
154
+
155
+ async function isProjectCreated() {
156
+ if (storage.isFile(".env"))
157
+ return await isAppKeySet();
158
+ if (storage.isFile(".env.example"))
159
+ await spawn("cp .env.example .env", { stdio: "inherit", cwd: projectPath() });
160
+ return await isAppKeySet();
161
+ }
162
+ async function installIfVersionMismatch() {
163
+ const dependenciesYaml = storage.fs.readFileSync(projectPath("tea.yaml"), "utf8");
164
+ const dependencies = parseYaml(dependenciesYaml).dependencies;
165
+ const requiredNodeVersion = dependencies["nodejs.org"];
166
+ const requiredPnpmVersion = dependencies["pnpm.io"];
167
+ const installedNodeVersion = process.version;
168
+ const installedPnpmVersion = execSync("pnpm -v").trim();
169
+ if (!semver.satisfies(installedNodeVersion, requiredNodeVersion)) {
170
+ log.error(`Installed Node.js version (${installedNodeVersion}) does not satisfy required version (${requiredNodeVersion}). One moment...`);
171
+ await runCommand(`tea +nodejs.org${requiredNodeVersion} >/dev/null 2>&1`);
172
+ }
173
+ if (!semver.satisfies(installedPnpmVersion, requiredPnpmVersion)) {
174
+ log.error(`Installed pnpm version (${installedPnpmVersion}) does not satisfy required version (${requiredPnpmVersion}). One moment...`);
175
+ await runCommand(`tea +pnpm.io${requiredPnpmVersion} >/dev/null 2>&1`);
176
+ }
177
+ }
178
+ async function frameworkVersion() {
179
+ return (await storage.readPackageJson(frameworkPath("package.json"))).version;
180
+ }
181
+ async function isAppKeySet() {
182
+ const env = await storage.readTextFile(".env", projectPath());
183
+ const lines = env.data.split("\n");
184
+ const appKey = lines.find((line) => line.startsWith("APP_KEY="));
185
+ return !!(appKey && appKey.length > 16);
186
+ }
187
+ function determineResetPreset(preset) {
188
+ if (ui.reset)
189
+ preset = ui.reset;
190
+ if (preset === "tailwind")
191
+ return ["import '@unocss/reset/tailwind.css'"];
192
+ if (preset === "normalize")
193
+ return ["import '@unocss/reset/normalize.css'"];
194
+ if (preset === "sanitize")
195
+ return ["import '@unocss/reset/sanitize/sanitize.css'", "import '@unocss/reset/sanitize/assets.css"];
196
+ if (preset === "eric-meyer")
197
+ return ["import '@unocss/reset/eric-meyer.css'"];
198
+ if (preset === "antfu")
199
+ return ["import '@unocss/reset/antfu.css'"];
200
+ return [];
201
+ }
202
+ function isManifest(obj) {
203
+ return obj && typeof obj === "object" && isOptionalString(obj.name) && isOptionalString(obj.version) && isOptionalString(obj.description);
204
+ }
205
+ function isOptionalString(value) {
206
+ const type = typeof value;
207
+ return value === null || type === "undefined" || type === "string";
208
+ }
209
+ async function setEnvValue(key, value) {
210
+ const file = await storage.readTextFile(projectPath(".env"));
211
+ await storage.writeTextFile({
212
+ path: projectPath(".env"),
213
+ data: file.data.replace(/APP_KEY=/g, `APP_KEY=${value}`)
214
+ // todo: do not hardcode the APP_KEY here and instead use the key parameter
215
+ });
216
+ }
217
+ async function runNpmScript(script, options) {
218
+ const { data: manifest } = await storage.readJsonFile("package.json", frameworkPath());
219
+ if (isManifest(manifest) && hasScript(manifest, script))
220
+ return await runCommand(`pnpm run ${script}`, options);
221
+ log.error(`The specified npm script "${script}" does not exist in the package.json file`);
222
+ process.exit();
223
+ }
224
+ function hasScript(manifest, script) {
225
+ const scripts = manifest.scripts;
226
+ if (scripts && typeof scripts === "object")
227
+ return Boolean(scripts[script]);
228
+ return false;
229
+ }
230
+ function parseYaml(content) {
231
+ return parse(content);
232
+ }
233
+ function determineDebugLevel(options) {
234
+ if (options?.verbose === true)
235
+ return true;
236
+ return app.debug === true;
237
+ }
238
+ function isIpv6(address) {
239
+ return address.family === "IPv6" || address.family === 6;
240
+ }
241
+
242
+ const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
243
+ function rand(min, max) {
244
+ min = Math.ceil(min);
245
+ max = Math.floor(max);
246
+ return Math.floor(Math.random() * (max - min + 1)) + min;
247
+ }
248
+
249
+ const VOID = Symbol("p-void");
250
+ class PInstance extends Promise {
251
+ constructor(items = [], options) {
252
+ super(() => {
253
+ });
254
+ this.items = items;
255
+ this.options = options;
256
+ this.promises = /* @__PURE__ */ new Set();
257
+ }
258
+ get promise() {
259
+ let batch;
260
+ const items = [...Array.from(this.items), ...Array.from(this.promises)];
261
+ if (this.options?.concurrency) {
262
+ const limit = pLimit(this.options.concurrency);
263
+ batch = Promise.all(items.map((p2) => limit(() => p2)));
264
+ } else {
265
+ batch = Promise.all(items);
266
+ }
267
+ return batch.then((l) => l.filter((i) => i !== VOID));
268
+ }
269
+ add(...args) {
270
+ args.forEach((i) => {
271
+ this.promises.add(i);
272
+ });
273
+ }
274
+ map(fn) {
275
+ return new PInstance(
276
+ Array.from(this.items).map(async (i, idx) => {
277
+ const v = await i;
278
+ if (v === VOID)
279
+ return VOID;
280
+ return fn(v, idx);
281
+ }),
282
+ this.options
283
+ );
284
+ }
285
+ filter(fn) {
286
+ return new PInstance(
287
+ Array.from(this.items).map(async (i, idx) => {
288
+ const v = await i;
289
+ const r = await fn(v, idx);
290
+ if (!r)
291
+ return VOID;
292
+ return v;
293
+ }),
294
+ this.options
295
+ );
296
+ }
297
+ forEach(fn) {
298
+ return this.map(fn).then();
299
+ }
300
+ reduce(fn, initialValue) {
301
+ return this.promise.then((array) => array.reduce(fn, initialValue));
302
+ }
303
+ clear() {
304
+ this.promises.clear();
305
+ }
306
+ then(fn) {
307
+ const p2 = this.promise;
308
+ if (fn)
309
+ return p2.then(fn);
310
+ return p2;
311
+ }
312
+ catch(fn) {
313
+ return this.promise.catch(fn);
314
+ }
315
+ finally(fn) {
316
+ return this.promise.finally(fn);
317
+ }
318
+ }
319
+ function p(items, options) {
320
+ return new PInstance(items, options);
321
+ }
322
+
323
+ function createSingletonPromise(fn) {
324
+ let _promise;
325
+ function wrapper() {
326
+ if (!_promise)
327
+ _promise = fn();
328
+ return _promise;
329
+ }
330
+ wrapper.reset = async () => {
331
+ const _prev = _promise;
332
+ _promise = void 0;
333
+ if (_prev)
334
+ await _prev;
335
+ };
336
+ return wrapper;
337
+ }
338
+ function createPromiseLock() {
339
+ const locks = [];
340
+ return {
341
+ async run(fn) {
342
+ const p = fn();
343
+ locks.push(p);
344
+ try {
345
+ return await p;
346
+ } finally {
347
+ remove(locks, p);
348
+ }
349
+ },
350
+ async wait() {
351
+ await Promise.allSettled(locks);
352
+ },
353
+ isWaiting() {
354
+ return Boolean(locks.length);
355
+ },
356
+ clear() {
357
+ locks.length = 0;
358
+ }
359
+ };
360
+ }
361
+ function createControlledPromise() {
362
+ let resolve, reject;
363
+ const promise = new Promise((_resolve, _reject) => {
364
+ resolve = _resolve;
365
+ reject = _reject;
366
+ });
367
+ promise.resolve = resolve;
368
+ promise.reject = reject;
369
+ return promise;
370
+ }
371
+ function sleep(ms, callback) {
372
+ return new Promise(
373
+ (resolve) => setTimeout(async () => {
374
+ await callback?.();
375
+ resolve();
376
+ }, ms)
377
+ );
378
+ }
379
+
380
+ function throttle(fn, wait = 300) {
381
+ let inThrottle;
382
+ let lastFn;
383
+ let lastTime;
384
+ return function(...args) {
385
+ if (!inThrottle) {
386
+ fn.apply(this, args);
387
+ lastTime = Date.now();
388
+ inThrottle = true;
389
+ } else {
390
+ clearTimeout(lastFn);
391
+ lastFn = setTimeout(() => {
392
+ if (Date.now() - lastTime >= wait) {
393
+ fn.apply(this, args);
394
+ lastTime = Date.now();
395
+ }
396
+ }, Math.max(wait - (Date.now() - lastTime), 0));
397
+ }
398
+ };
399
+ }
400
+
401
+ export { batchInvoke, clamp, createControlledPromise, createPromiseLock, createSingletonPromise, defineApp, defineCache, defineCdn, defineChat, defineCli, defineCronJobsConfig, defineDatabase, defineDebugConfig, defineDns, defineEmail, defineEmailConfig, defineEvents, defineGit, defineHashing, defineJobsConfig, defineLibrary, defineModel, defineNotification, definePage, definePayment, defineQueue, defineSearchEngine, defineServices, defineSms, defineStorage, defineUi, determineDebugLevel, determineResetPreset, frameworkVersion, getTypeName, hasScript, installIfVersionMismatch, isAppKeySet, isDeepEqual, isIpv6, isManifest, isOptionalString, isProjectCreated, isTruthy, loop, noNull, notNullish, notUndefined, p, parseYaml, rand, runNpmScript, setEnvValue, sleep, tap, throttle, toString };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.53.1",
5
- "packageManager": "pnpm@8.5.1",
4
+ "version": "0.56.23",
5
+ "packageManager": "pnpm@8.6.5",
6
6
  "description": "The Stacks helper functions.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -43,34 +43,35 @@
43
43
  "README.md"
44
44
  ],
45
45
  "peerDependencies": {
46
- "@vueuse/core": "^10.1.2",
46
+ "@dinero.js/currencies": "2.0.0-alpha.14",
47
+ "@vueuse/core": "^10.2.1",
47
48
  "@vueuse/head": "^1.1.26",
48
- "@vueuse/math": "^10.1.2",
49
- "@vueuse/shared": "^10.1.2",
49
+ "@vueuse/math": "^10.2.1",
50
+ "@vueuse/shared": "^10.2.1",
50
51
  "defu": "^6.1.2",
51
- "detect-indent": "^7.0.1",
52
- "detect-newline": "^4.0.0",
53
52
  "dinero.js": "2.0.0-alpha.14",
54
53
  "fast-glob": "^3.2.12",
55
54
  "kolorist": "1.8.0",
56
55
  "p-limit": "^4.0.0",
57
56
  "rimraf": "^5.0.1",
58
- "semver": "^7.5.1",
59
- "yaml": "^2.3.0",
60
- "@stacksjs/arrays": "0.53.1",
61
- "@stacksjs/cli": "0.53.1",
62
- "@stacksjs/config": "0.53.1",
63
- "@stacksjs/development": "0.53.1",
64
- "@stacksjs/lint": "0.53.1",
65
- "@stacksjs/path": "0.53.1",
66
- "@stacksjs/storage": "0.53.1",
67
- "@stacksjs/types": "0.53.1"
57
+ "semver": "^7.5.3",
58
+ "yaml": "^2.3.1",
59
+ "@stacksjs/arrays": "0.56.23",
60
+ "@stacksjs/cli": "0.56.23",
61
+ "@stacksjs/config": "0.56.23",
62
+ "@stacksjs/development": "0.56.23",
63
+ "@stacksjs/path": "0.56.23",
64
+ "@stacksjs/lint": "0.56.23",
65
+ "@stacksjs/storage": "0.56.23",
66
+ "@stacksjs/strings": "0.56.23",
67
+ "@stacksjs/types": "0.56.23"
68
68
  },
69
69
  "dependencies": {
70
- "@vueuse/core": "^10.1.2",
70
+ "@dinero.js/currencies": "2.0.0-alpha.14",
71
+ "@vueuse/core": "^10.2.1",
71
72
  "@vueuse/head": "^1.1.26",
72
- "@vueuse/math": "^10.1.2",
73
- "@vueuse/shared": "^10.1.2",
73
+ "@vueuse/math": "^10.2.1",
74
+ "@vueuse/shared": "^10.2.1",
74
75
  "defu": "^6.1.2",
75
76
  "detect-indent": "^7.0.1",
76
77
  "detect-newline": "^4.0.0",
@@ -80,18 +81,18 @@
80
81
  "p-limit": "^4.0.0",
81
82
  "perfect-debounce": "^1.0.0",
82
83
  "rimraf": "^5.0.1",
83
- "semver": "^7.5.1",
84
- "yaml": "^2.3.0",
85
- "@stacksjs/arrays": "0.53.1",
86
- "@stacksjs/cli": "0.53.1",
87
- "@stacksjs/config": "0.53.1",
88
- "@stacksjs/lint": "0.53.1",
89
- "@stacksjs/path": "0.53.1",
90
- "@stacksjs/storage": "0.53.1",
91
- "@stacksjs/types": "0.53.1"
84
+ "semver": "^7.5.3",
85
+ "yaml": "^2.3.1",
86
+ "@stacksjs/arrays": "0.56.23",
87
+ "@stacksjs/cli": "0.56.23",
88
+ "@stacksjs/config": "0.56.23",
89
+ "@stacksjs/lint": "0.56.23",
90
+ "@stacksjs/path": "0.56.23",
91
+ "@stacksjs/storage": "0.56.23",
92
+ "@stacksjs/types": "0.56.23"
92
93
  },
93
94
  "devDependencies": {
94
- "@stacksjs/development": "0.53.1"
95
+ "@stacksjs/development": "0.56.23"
95
96
  },
96
97
  "scripts": {
97
98
  "build": "unbuild",
package/dist/base.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare function toString(v: any): any;
2
- export declare function loop(times: number, callback: any): void;
3
- export declare function getTypeName(v: any): any;
package/dist/base.mjs DELETED
@@ -1,12 +0,0 @@
1
- export function toString(v) {
2
- return Object.prototype.toString.call(v);
3
- }
4
- export function loop(times, callback) {
5
- [...Array(times)].forEach((item, i) => callback(i));
6
- }
7
- export function getTypeName(v) {
8
- if (v === null)
9
- return "null";
10
- const type = toString(v).slice(8, -1).toLowerCase();
11
- return typeof v === "object" || typeof v === "function" ? type : typeof v;
12
- }
package/dist/config.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import type { AppOptions, CacheOptions, CdnOptions, CronJobOptions, DatabaseOptions, DebugOptions, DnsOptions, EmailOptions, Events, GitOptions, HashingOptions, LibraryOptions, Model, NotificationOptions, PagesOption, PaymentOptions, SearchEngineOptions, ServicesOptions, StorageOptions, UiOptions, UserCliOptions } from '@stacksjs/types';
2
- export declare function env(key: any, _fallback?: any): any;
3
- export declare function defineApp(options: Partial<AppOptions>): Partial<AppOptions>;
4
- export declare function defineCache(options: Partial<CacheOptions>): Partial<CacheOptions>;
5
- export declare function defineCdn(options: Partial<CdnOptions>): Partial<CdnOptions>;
6
- export declare function defineCli(options: Partial<UserCliOptions>): Partial<UserCliOptions>;
7
- export declare function defineCronJobsConfig(options: Partial<CronJobOptions>[]): Partial<CronJobOptions>[];
8
- export declare function defineDatabase(options: Partial<DatabaseOptions>): Partial<DatabaseOptions>;
9
- export declare function defineDebugConfig(options: Partial<DebugOptions>): Partial<DebugOptions>;
10
- export declare function defineDns(options: Partial<DnsOptions>): Partial<DnsOptions>;
11
- export declare function defineEmailConfig(options: Partial<EmailOptions>): Partial<EmailOptions>;
12
- export declare function defineEvents(options: Partial<Events>): Partial<Events>;
13
- export declare function defineGit(options: Partial<GitOptions>): Partial<GitOptions>;
14
- export declare function defineHashing(options: Partial<HashingOptions>): Partial<HashingOptions>;
15
- export declare function defineLibrary(options: Partial<LibraryOptions>): Partial<LibraryOptions>;
16
- export declare function defineModel(options: Partial<Model>): Partial<Model>;
17
- export declare function defineNotification(options: Partial<NotificationOptions>): Partial<NotificationOptions>;
18
- export declare function definePage(options: Partial<PagesOption>): Partial<PagesOption>;
19
- export declare function definePayment(options: Partial<PaymentOptions>): Partial<PaymentOptions>;
20
- export declare function defineSearchEngine(options: Partial<SearchEngineOptions>): Partial<SearchEngineOptions>;
21
- export declare function defineServices(options: Partial<ServicesOptions>): Partial<ServicesOptions>;
22
- export declare function defineStorage(options: Partial<StorageOptions>): Partial<StorageOptions>;
23
- export declare function defineUi(options: Partial<UiOptions>): Partial<UiOptions>;
package/dist/config.mjs DELETED
@@ -1,66 +0,0 @@
1
- export function env(key, _fallback) {
2
- return key;
3
- }
4
- export function defineApp(options) {
5
- return options;
6
- }
7
- export function defineCache(options) {
8
- return options;
9
- }
10
- export function defineCdn(options) {
11
- return options;
12
- }
13
- export function defineCli(options) {
14
- return options;
15
- }
16
- export function defineCronJobsConfig(options) {
17
- return options;
18
- }
19
- export function defineDatabase(options) {
20
- return options;
21
- }
22
- export function defineDebugConfig(options) {
23
- return options;
24
- }
25
- export function defineDns(options) {
26
- return options;
27
- }
28
- export function defineEmailConfig(options) {
29
- return options;
30
- }
31
- export function defineEvents(options) {
32
- return options;
33
- }
34
- export function defineGit(options) {
35
- return options;
36
- }
37
- export function defineHashing(options) {
38
- return options;
39
- }
40
- export function defineLibrary(options) {
41
- return options;
42
- }
43
- export function defineModel(options) {
44
- return options;
45
- }
46
- export function defineNotification(options) {
47
- return options;
48
- }
49
- export function definePage(options) {
50
- return options;
51
- }
52
- export function definePayment(options) {
53
- return options;
54
- }
55
- export function defineSearchEngine(options) {
56
- return options;
57
- }
58
- export function defineServices(options) {
59
- return options;
60
- }
61
- export function defineStorage(options) {
62
- return options;
63
- }
64
- export function defineUi(options) {
65
- return options;
66
- }
@@ -1 +0,0 @@
1
- export { add, allocate, compare, convert, equal, greaterThan, greaterThanOrEqual, hasSubUnits, isZero, lessThan, lessThanOrEqual, maximum, minimum, multiply, normalizeScale, dinero, dinero as money, subtract, toSnapshot, toUnits, toDecimal, trimScale, haveSameCurrency, haveSameAmount, } from 'dinero.js';
package/dist/currency.mjs DELETED
@@ -1,26 +0,0 @@
1
- export {
2
- add,
3
- allocate,
4
- compare,
5
- convert,
6
- equal,
7
- greaterThan,
8
- greaterThanOrEqual,
9
- hasSubUnits,
10
- isZero,
11
- lessThan,
12
- lessThanOrEqual,
13
- maximum,
14
- minimum,
15
- multiply,
16
- normalizeScale,
17
- dinero,
18
- dinero as money,
19
- subtract,
20
- toSnapshot,
21
- toUnits,
22
- toDecimal,
23
- trimScale,
24
- haveSameCurrency,
25
- haveSameAmount
26
- } from "dinero.js";
@@ -1 +0,0 @@
1
- export { debounce } from 'perfect-debounce';
package/dist/debounce.mjs DELETED
@@ -1 +0,0 @@
1
- export { debounce } from "perfect-debounce";
package/dist/delete.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { rimraf } from 'rimraf';
2
- export { rimraf, rimraf as del };
package/dist/delete.mjs DELETED
@@ -1,2 +0,0 @@
1
- import { rimraf } from "rimraf";
2
- export { rimraf, rimraf as del };
package/dist/equal.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function isDeepEqual(value1: any, value2: any): boolean;