@azure-net/kit 3.1.0 → 3.9.1

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.
Files changed (48) hide show
  1. package/README.md +2 -2
  2. package/dist/core/delivery/injectableDependencies/AsyncHelpers.d.ts +8 -2
  3. package/dist/core/delivery/injectableDependencies/AsyncHelpers.js +32 -10
  4. package/dist/core/delivery/schema/Schema.js +1 -1
  5. package/dist/core/delivery/serverAction/CreateServerAction.js +1 -1
  6. package/dist/core/infra/datasource/BaseDatasource.d.ts +11 -11
  7. package/dist/core/infra/datasource/BaseDatasource.js +4 -4
  8. package/dist/core/infra/httpService/HttpServiceInstance.d.ts +82 -0
  9. package/dist/core/infra/httpService/HttpServiceInstance.js +342 -0
  10. package/dist/core/infra/httpService/index.d.ts +1 -1
  11. package/dist/core/infra/httpService/index.js +1 -1
  12. package/dist/core/infra/query/QueryBuilder.d.ts +9 -21
  13. package/dist/core/infra/query/QueryBuilder.js +62 -50
  14. package/dist/core/shared/appEventBus/EventBus.d.ts +1 -1
  15. package/dist/core/shared/appEventBus/EventBus.js +2 -2
  16. package/dist/core/shared/boundaryProvider/Provider.d.ts +2 -2
  17. package/dist/core/shared/boundaryProvider/Provider.js +14 -8
  18. package/dist/core/shared/cookie/UniversalCookie.js +2 -2
  19. package/dist/core/shared/middleware/Middleware.js +12 -8
  20. package/dist/core/svelte/ActiveForm/ActiveForm.svelte.d.ts +4 -1
  21. package/dist/core/svelte/ActiveForm/ActiveForm.svelte.js +19 -18
  22. package/dist/core/svelte/AsyncSignal/AsyncSignal.svelte.js +1 -1
  23. package/dist/core/svelte/Query/Query.svelte.js +1 -1
  24. package/dist/core/ui/onClickOutside/OnClickOutside.js +1 -1
  25. package/dist/core/ui/scrollTo/index.js +1 -1
  26. package/dist/edges/context/index.d.ts +1 -1
  27. package/dist/edges/context/index.js +1 -1
  28. package/dist/edges/dev/index.d.ts +1 -1
  29. package/dist/edges/dev/index.js +1 -1
  30. package/dist/edges/index.d.ts +1 -1
  31. package/dist/edges/index.js +1 -1
  32. package/dist/edges/plugin/index.d.ts +1 -1
  33. package/dist/edges/plugin/index.js +1 -1
  34. package/dist/edges/server/index.d.ts +1 -1
  35. package/dist/edges/server/index.js +1 -1
  36. package/dist/edges/state/index.d.ts +1 -1
  37. package/dist/edges/state/index.js +1 -1
  38. package/dist/i18n/index.d.ts +1 -1
  39. package/dist/i18n/index.js +1 -1
  40. package/dist/tools/index.d.ts +2 -1
  41. package/dist/tools/index.js +2 -1
  42. package/package.json +36 -42
  43. package/dist/core/infra/httpService/HttpService.d.ts +0 -74
  44. package/dist/core/infra/httpService/HttpService.js +0 -164
  45. package/dist/core/shared/eventBus/EventBus.d.ts +0 -87
  46. package/dist/core/shared/eventBus/EventBus.js +0 -227
  47. package/dist/core/shared/eventBus/index.d.ts +0 -1
  48. package/dist/core/shared/eventBus/index.js +0 -1
@@ -1,57 +1,69 @@
1
- export class QueryBuilder {
2
- defaultArrayFormat;
3
- defaultObjectFormat;
4
- constructor(options) {
5
- this.defaultArrayFormat = options?.arrayFormat ?? 'repeat';
6
- this.defaultObjectFormat = options?.objectFormat ?? 'default';
1
+ const normalizeSettings = (base, override) => {
2
+ return {
3
+ delimiter: override?.delimiter ?? base?.delimiter ?? true,
4
+ arrayFormat: override?.arrayFormat ?? base?.arrayFormat ?? 'repeat',
5
+ objectFormat: override?.objectFormat ?? base?.objectFormat ?? 'default',
6
+ transform: override?.transform ?? base?.transform
7
+ };
8
+ };
9
+ const encodeQuery = (entries) => entries.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join('&');
10
+ const encodeArrayEntries = (key, values, arrayFormat) => {
11
+ const cleanValues = values.filter((v) => v !== null && v !== undefined).map((v) => String(v));
12
+ switch (arrayFormat) {
13
+ case 'repeat':
14
+ return cleanValues.map((v) => [key, v]);
15
+ case 'brackets':
16
+ return cleanValues.map((v) => [`${key}[]`, v]);
17
+ case 'comma':
18
+ return [[key, cleanValues.join(',')]];
19
+ case 'json':
20
+ return [[key, JSON.stringify(cleanValues)]];
21
+ default:
22
+ throw new Error(`Unsupported array format: ${arrayFormat}`);
7
23
  }
8
- transform(object) {
9
- return object;
10
- }
11
- build(query = {}, opts) {
12
- const params = this.transform(query);
13
- const arrayFormat = opts?.arrayFormat ?? this.defaultArrayFormat;
14
- const objectFormat = opts?.objectFormat ?? this.defaultObjectFormat;
15
- const parts = this.serialize(params, arrayFormat, objectFormat);
16
- const delimiter = opts?.delimiter ?? true;
17
- return delimiter && parts.length ? `?${parts.join('&')}` : parts.join('&');
18
- }
19
- serialize(obj, arrayFormat, objectFormat, prefix = '') {
20
- const parts = [];
21
- for (const [key, value] of Object.entries(obj)) {
22
- if (value === null || value === undefined)
23
- continue;
24
- const fullKey = prefix ? (objectFormat === 'nested-brackets' ? `${prefix}[${key}]` : `${prefix}.${key}`) : key;
25
- if (Array.isArray(value)) {
26
- parts.push(...this.encodeArray(fullKey, value, arrayFormat));
27
- }
28
- else if (typeof value === 'object' && !(value instanceof Date)) {
29
- if (objectFormat === 'nested-brackets') {
30
- parts.push(...this.serialize(value, arrayFormat, objectFormat, fullKey));
31
- }
32
- else {
33
- parts.push(`${encodeURIComponent(fullKey)}=${encodeURIComponent(JSON.stringify(value))}`);
34
- }
24
+ };
25
+ const serializeEntries = (obj, arrayFormat, objectFormat, prefix = '') => {
26
+ const entries = [];
27
+ for (const [key, value] of Object.entries(obj)) {
28
+ if (value === null || value === undefined)
29
+ continue;
30
+ const fullKey = prefix ? (objectFormat === 'nested-brackets' ? `${prefix}[${key}]` : `${prefix}.${key}`) : key;
31
+ if (Array.isArray(value)) {
32
+ entries.push(...encodeArrayEntries(fullKey, value, arrayFormat));
33
+ continue;
34
+ }
35
+ if (typeof value === 'object' && !(value instanceof Date)) {
36
+ if (objectFormat === 'nested-brackets') {
37
+ entries.push(...serializeEntries(value, arrayFormat, objectFormat, fullKey));
35
38
  }
36
39
  else {
37
- parts.push(`${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`);
40
+ entries.push([fullKey, JSON.stringify(value)]);
38
41
  }
42
+ continue;
39
43
  }
40
- return parts;
44
+ entries.push([fullKey, String(value)]);
41
45
  }
42
- encodeArray(key, arr, arrayFormat) {
43
- const cleanArray = arr.filter((v) => v !== null && v !== undefined).map(String);
44
- switch (arrayFormat) {
45
- case 'repeat':
46
- return cleanArray.map((v) => `${encodeURIComponent(key)}=${encodeURIComponent(v)}`);
47
- case 'brackets':
48
- return cleanArray.map((v) => `${encodeURIComponent(key)}[]=${encodeURIComponent(v)}`);
49
- case 'comma':
50
- return [`${encodeURIComponent(key)}=${encodeURIComponent(cleanArray.join(','))}`];
51
- case 'json':
52
- return [`${encodeURIComponent(key)}=${encodeURIComponent(JSON.stringify(cleanArray))}`];
53
- default:
54
- throw new Error(`Unsupported array format: ${arrayFormat}`);
55
- }
46
+ return entries;
47
+ };
48
+ const toSearchParamsWithSettings = (query, settings) => {
49
+ const source = settings.transform ? settings.transform(query) : query;
50
+ const entries = serializeEntries(source, settings.arrayFormat, settings.objectFormat);
51
+ const params = new URLSearchParams();
52
+ for (const [key, value] of entries) {
53
+ params.append(key, value);
56
54
  }
57
- }
55
+ return params;
56
+ };
57
+ export const createQueryInstance = (defaults) => {
58
+ return {
59
+ toSearchParams: (query, settings) => {
60
+ const resolved = normalizeSettings(defaults, settings);
61
+ return toSearchParamsWithSettings(query, resolved);
62
+ },
63
+ toString: (query, settings) => {
64
+ const resolved = normalizeSettings(defaults, settings);
65
+ const serialized = encodeQuery(Array.from(toSearchParamsWithSettings(query, resolved).entries()));
66
+ return resolved.delimiter && serialized ? `?${serialized}` : serialized;
67
+ }
68
+ };
69
+ };
@@ -1,4 +1,4 @@
1
- import { EventBus } from 'azure-net-tools';
1
+ import { EventBus } from '@azure-net/tools';
2
2
  export declare const AppEvents: () => {
3
3
  bus: EventBus<any>;
4
4
  };
@@ -1,5 +1,5 @@
1
- import { EventBus } from 'azure-net-tools';
2
- import { createPresenter } from 'edges-svelte';
1
+ import { EventBus } from '@azure-net/tools';
2
+ import { createPresenter } from '@azure-net/edges';
3
3
  export const AppEvents = createPresenter(() => {
4
4
  const appEventBus = new EventBus({ OnAsyncHelperError: [] });
5
5
  return {
@@ -1,7 +1,7 @@
1
- type ServiceFactory<T> = () => T | Promise<T>;
1
+ type ServiceFactory<T> = () => T;
2
2
  type ServiceMap = Record<string, ServiceFactory<unknown>>;
3
3
  type ResolvedServices<T extends ServiceMap> = {
4
- [K in keyof T]: Awaited<ReturnType<T[K]>>;
4
+ [K in keyof T]: ReturnType<T[K]>;
5
5
  };
6
6
  type InferProviderType<T> = T extends ProviderWithType<infer S> ? ResolvedServices<S> : never;
7
7
  export interface ProviderWithType<T extends ServiceMap> {
@@ -1,11 +1,11 @@
1
1
  import { RequestContext } from '../../../edges/context/index.js';
2
- import { EnvironmentUtil } from 'azure-net-tools';
2
+ import { BROWSER } from '@azure-net/tools/environment';
3
3
  const clientCache = new Map();
4
4
  const factoriesCache = new WeakMap();
5
5
  const providerProxyCache = new Map();
6
6
  const clientBootFlags = new Map();
7
7
  const getProviderCache = (providerName) => {
8
- if (EnvironmentUtil.isBrowser) {
8
+ if (BROWSER) {
9
9
  if (!clientCache.has(providerName)) {
10
10
  clientCache.set(providerName, new Map());
11
11
  }
@@ -28,7 +28,7 @@ const getProviderCache = (providerName) => {
28
28
  }
29
29
  };
30
30
  const getBootFlag = (providerName) => {
31
- if (EnvironmentUtil.isBrowser) {
31
+ if (BROWSER) {
32
32
  return clientBootFlags.get(providerName) ?? false;
33
33
  }
34
34
  else {
@@ -41,7 +41,7 @@ const getBootFlag = (providerName) => {
41
41
  }
42
42
  };
43
43
  const setBootFlag = (providerName, value) => {
44
- if (EnvironmentUtil.isBrowser) {
44
+ if (BROWSER) {
45
45
  clientBootFlags.set(providerName, value);
46
46
  }
47
47
  else {
@@ -56,7 +56,7 @@ const setBootFlag = (providerName, value) => {
56
56
  export const createBoundaryProvider = (name, settings) => {
57
57
  const { dependsOn = {}, boot, register } = settings;
58
58
  const providerFn = () => {
59
- if (EnvironmentUtil.isBrowser && providerProxyCache.has(name)) {
59
+ if (BROWSER && providerProxyCache.has(name)) {
60
60
  return providerProxyCache.get(name);
61
61
  }
62
62
  const cache = getProviderCache(name);
@@ -82,7 +82,7 @@ export const createBoundaryProvider = (name, settings) => {
82
82
  });
83
83
  }
84
84
  factories = register(deps);
85
- if (EnvironmentUtil.isBrowser) {
85
+ if (BROWSER) {
86
86
  factoriesCache.set(register, factories);
87
87
  }
88
88
  return factories;
@@ -97,7 +97,13 @@ export const createBoundaryProvider = (name, settings) => {
97
97
  throw new Error(`Service '${key}' not found in provider '${name}'`);
98
98
  }
99
99
  const factory = factories[key];
100
+ if (typeof factory !== 'function') {
101
+ throw Error('Factory must be a function');
102
+ }
100
103
  const instance = factory();
104
+ if (instance && typeof instance?.then === 'function') {
105
+ throw new Error(`Service '${key}' in provider '${name}' returned Promise.`);
106
+ }
101
107
  cache.set(key, instance);
102
108
  return instance;
103
109
  },
@@ -114,7 +120,7 @@ export const createBoundaryProvider = (name, settings) => {
114
120
  return [...new Set([...cachedKeys, ...factoryKeys])];
115
121
  }
116
122
  });
117
- if (EnvironmentUtil.isBrowser) {
123
+ if (BROWSER) {
118
124
  providerProxyCache.set(name, providerProxy);
119
125
  }
120
126
  if (boot && !getBootFlag(name)) {
@@ -143,7 +149,7 @@ export function cleanupProvider(name) {
143
149
  await Promise.all(promises);
144
150
  cache.clear();
145
151
  };
146
- if (EnvironmentUtil.isBrowser) {
152
+ if (BROWSER) {
147
153
  const cache = clientCache.get(name);
148
154
  if (cache) {
149
155
  void cleanupCache(cache);
@@ -1,5 +1,5 @@
1
- import { Cookies, EnvironmentUtil } from 'azure-net-tools';
2
- import { RequestContext } from 'edges-svelte/context';
1
+ import { Cookies, EnvironmentUtil } from '@azure-net/tools';
2
+ import { RequestContext } from '@azure-net/edges/context';
3
3
  /**
4
4
  * Utility class for managing cookies in svelte ssr (browser and server).
5
5
  * Supports setting, getting, deleting, checking, and clearing cookies.
@@ -1,12 +1,12 @@
1
1
  import { error, redirect } from '@sveltejs/kit';
2
- import { RequestContext } from 'edges-svelte/context';
2
+ import { RequestContext } from '@azure-net/edges/context';
3
3
  import { beforeNavigate, goto } from '$app/navigation';
4
4
  import { page } from '$app/state';
5
- import { EnvironmentUtil } from 'azure-net-tools';
5
+ import { BROWSER } from '@azure-net/tools/environment';
6
6
  import { UniversalCookie } from '../cookie/index.js';
7
7
  export const createMiddlewareManager = (middlewares) => {
8
8
  const universalRedirect = (location, status = 301, navigation) => {
9
- if (EnvironmentUtil.isBrowser) {
9
+ if (BROWSER) {
10
10
  if (navigation) {
11
11
  navigation?.cancel();
12
12
  }
@@ -18,8 +18,8 @@ export const createMiddlewareManager = (middlewares) => {
18
18
  };
19
19
  const executeMiddlewares = async (navigation) => {
20
20
  let event;
21
- let from = undefined;
22
- if (EnvironmentUtil.isServer) {
21
+ let from;
22
+ if (!BROWSER) {
23
23
  event = RequestContext.current().event;
24
24
  const referer = event?.request.headers.get('referer');
25
25
  from = referer ? new URL(referer) : undefined;
@@ -27,7 +27,7 @@ export const createMiddlewareManager = (middlewares) => {
27
27
  else {
28
28
  from = navigation?.from?.url ?? undefined;
29
29
  }
30
- const to = (EnvironmentUtil.isBrowser ? (navigation?.to?.url ?? page?.url) : event?.url);
30
+ const to = (BROWSER ? (navigation?.to?.url ?? page?.url) : event?.url);
31
31
  for (const middleware of middlewares) {
32
32
  let shouldContinue = false;
33
33
  const next = (location, status = 301) => {
@@ -40,14 +40,14 @@ export const createMiddlewareManager = (middlewares) => {
40
40
  event,
41
41
  page,
42
42
  cookies: UniversalCookie,
43
- isServer: EnvironmentUtil.isServer,
43
+ isServer: !BROWSER,
44
44
  to,
45
45
  from,
46
46
  error,
47
47
  next
48
48
  });
49
49
  if (!shouldContinue) {
50
- if (EnvironmentUtil.isBrowser) {
50
+ if (BROWSER) {
51
51
  navigation?.cancel();
52
52
  if (from) {
53
53
  void goto(from.pathname);
@@ -61,7 +61,11 @@ export const createMiddlewareManager = (middlewares) => {
61
61
  }
62
62
  };
63
63
  const serverMiddleware = async () => await executeMiddlewares();
64
+ let clientRegistered = false;
64
65
  const clientMiddleware = () => {
66
+ if (!BROWSER || clientRegistered)
67
+ return;
68
+ clientRegistered = true;
65
69
  beforeNavigate(async (navigation) => {
66
70
  await executeMiddlewares(navigation);
67
71
  });
@@ -13,7 +13,10 @@ export interface FormConfig<FormData, Response, Initial extends Partial<FormData
13
13
  required?: readonly RequiredPath[];
14
14
  onSuccess?: (response: Response) => Promise<void> | void;
15
15
  onError?: () => Promise<void> | void;
16
- beforeSubmit?: (form: ActiveFormController<FormData, RequiredPath>, abort: () => void) => Promise<void> | void;
16
+ beforeSubmit?: (actions: {
17
+ form: ActiveFormController<FormData, RequiredPath>;
18
+ abort: () => void;
19
+ }) => Promise<void> | void;
17
20
  waitForInitialData?: boolean;
18
21
  }
19
22
  export interface ActiveForm<FormData, Response, Custom, RequiredPath extends string = never> {
@@ -1,4 +1,4 @@
1
- import { ObjectUtil } from 'azure-net-tools';
1
+ import { ObjectUtil } from '@azure-net/tools';
2
2
  export const createActiveForm = (onSubmit, config) => {
3
3
  const isPromise = (value) => {
4
4
  return typeof value?.then === 'function';
@@ -19,7 +19,7 @@ export const createActiveForm = (onSubmit, config) => {
19
19
  let formData = $state(ObjectUtil.deepClone(initial));
20
20
  let formErrors = $state({});
21
21
  let pending = $state(false);
22
- const dirty = $derived(JSON.stringify(formData) !== JSON.stringify(initial));
22
+ const dirty = $derived(!ObjectUtil.equals(formData, initial));
23
23
  const ready = (async () => {
24
24
  if (!initialSource.sync) {
25
25
  initial = (await initialSource.promise) ?? {};
@@ -31,29 +31,30 @@ export const createActiveForm = (onSubmit, config) => {
31
31
  })();
32
32
  const submit = async () => {
33
33
  pending = true;
34
- if (config?.beforeSubmit) {
35
- let aborted = false;
36
- const abort = () => {
37
- aborted = true;
38
- pending = false;
39
- };
40
- await config.beforeSubmit(formApi, () => abort());
41
- if (aborted) {
42
- return {
43
- success: false,
44
- response: undefined
34
+ try {
35
+ if (config?.beforeSubmit) {
36
+ let aborted = false;
37
+ const abort = () => {
38
+ aborted = true;
39
+ pending = false;
45
40
  };
41
+ await config.beforeSubmit({ form: formApi, abort: () => abort() });
42
+ if (aborted) {
43
+ return {
44
+ success: false,
45
+ response: undefined
46
+ };
47
+ }
46
48
  }
47
- }
48
- try {
49
49
  const result = await onSubmit($state.snapshot(formData));
50
- if (result.error?.fields) {
51
- formErrors = result.error.fields;
52
- }
53
50
  if (result.success) {
54
51
  await config?.onSuccess?.(result.response);
52
+ formErrors = {};
55
53
  }
56
54
  else {
55
+ if (result.error?.fields) {
56
+ formErrors = result.error.fields;
57
+ }
57
58
  await config?.onError?.();
58
59
  }
59
60
  return result;
@@ -1,5 +1,5 @@
1
1
  import { untrack } from 'svelte';
2
- import { EnvironmentUtil } from 'azure-net-tools';
2
+ import { EnvironmentUtil } from '@azure-net/tools';
3
3
  const createAsyncSignalManager = () => {
4
4
  const instances = EnvironmentUtil.isBrowser ? new Map() : undefined;
5
5
  const generateUid = () => {
@@ -1,4 +1,4 @@
1
- import { ObjectUtil } from 'azure-net-tools';
1
+ import { ObjectUtil } from '@azure-net/tools';
2
2
  import { untrack } from 'svelte';
3
3
  export const createQuery = (options) => {
4
4
  const { initial: initialValue, signal: initialSignal, excludeKeys, debounceMs = 0, autoRefresh = true } = options;
@@ -1,4 +1,4 @@
1
- import { EnvironmentUtil } from 'azure-net-tools';
1
+ import { EnvironmentUtil } from '@azure-net/tools';
2
2
  export const onClickOutside = (node, initiator) => {
3
3
  if (EnvironmentUtil.isServer)
4
4
  return { destroy: () => { } };
@@ -1,4 +1,4 @@
1
- import { EnvironmentUtil } from 'azure-net-tools';
1
+ import { EnvironmentUtil } from '@azure-net/tools';
2
2
  export const scrollTo = (nodeOrName, offset = 220) => {
3
3
  if (EnvironmentUtil.isBrowser) {
4
4
  setTimeout(() => { }, 1);
@@ -1 +1 @@
1
- export { RequestContext } from 'edges-svelte/context';
1
+ export { RequestContext } from '@azure-net/edges/context';
@@ -1 +1 @@
1
- export { RequestContext } from 'edges-svelte/context';
1
+ export { RequestContext } from '@azure-net/edges/context';
@@ -1 +1 @@
1
- export { DevTools } from 'edges-svelte/dev';
1
+ export { DevTools } from '@azure-net/edges/dev';
@@ -1 +1 @@
1
- export { DevTools } from 'edges-svelte/dev';
1
+ export { DevTools } from '@azure-net/edges/dev';
@@ -1 +1 @@
1
- export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction, __withEdgesUniversalLoad } from 'edges-svelte';
1
+ export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction, __withEdgesUniversalLoad } from '@azure-net/edges';
@@ -1 +1 @@
1
- export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction, __withEdgesUniversalLoad } from 'edges-svelte';
1
+ export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction, __withEdgesUniversalLoad } from '@azure-net/edges';
@@ -1 +1 @@
1
- export declare const edgesPlugin: any;
1
+ export declare const edgesPlugin: (options?: import("@azure-net/edges/plugin").EdgesPluginOptions) => import("vite").Plugin;
@@ -1,2 +1,2 @@
1
- import { createEdgesPluginFactory } from 'edges-svelte/plugin';
1
+ import { createEdgesPluginFactory } from '@azure-net/edges/plugin';
2
2
  export const edgesPlugin = createEdgesPluginFactory('@azure-net/kit', '@azure-net/kit/edges/server');
@@ -1 +1 @@
1
- export { edgesHandle, __autoWrapHandle, edgesHandleRaw, __withEdgesUniversalLoad, __withEdgesServerLoad, __withEdgesActions } from 'edges-svelte/server';
1
+ export { edgesHandle, __autoWrapHandle, edgesHandleRaw, __withEdgesUniversalLoad, __withEdgesServerLoad, __withEdgesActions } from '@azure-net/edges/server';
@@ -1 +1 @@
1
- export { edgesHandle, __autoWrapHandle, edgesHandleRaw, __withEdgesUniversalLoad, __withEdgesServerLoad, __withEdgesActions } from 'edges-svelte/server';
1
+ export { edgesHandle, __autoWrapHandle, edgesHandleRaw, __withEdgesUniversalLoad, __withEdgesServerLoad, __withEdgesActions } from '@azure-net/edges/server';
@@ -1 +1 @@
1
- export { createState, createDerivedState, createRawState } from 'edges-svelte/state';
1
+ export { createState, createDerivedState, createRawState } from '@azure-net/edges/state';
@@ -1 +1 @@
1
- export { createState, createDerivedState, createRawState } from 'edges-svelte/state';
1
+ export { createState, createDerivedState, createRawState } from '@azure-net/edges/state';
@@ -1 +1 @@
1
- export { createTranslations, type Path, type Translation } from 'edges-svelte-translations';
1
+ export { createTranslations, type Path, type Translation } from '@azure-net/edges-translations';
@@ -1 +1 @@
1
- export { createTranslations } from 'edges-svelte-translations';
1
+ export { createTranslations } from '@azure-net/edges-translations';
@@ -1 +1,2 @@
1
- export * from 'azure-net-tools';
1
+ export * from '@azure-net/tools';
2
+ export * from '@azure-net/tools/environment';
@@ -1 +1,2 @@
1
- export * from 'azure-net-tools';
1
+ export * from '@azure-net/tools';
2
+ export * from '@azure-net/tools/environment';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/kit",
3
- "version": "3.1.0",
3
+ "version": "3.9.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
@@ -64,41 +64,38 @@
64
64
  }
65
65
  },
66
66
  "peerDependencies": {
67
- "svelte": ">=5.0.0",
68
- "@sveltejs/kit": ">=2.16.0"
67
+ "@sveltejs/kit": ">=2.16.0",
68
+ "svelte": ">=5.0.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@eslint/compat": "^1.2.5",
72
- "@eslint/js": "^9.18.0",
73
- "@playwright/test": "^1.49.1",
74
- "@sveltejs/adapter-auto": "^6.0.0",
75
- "@sveltejs/kit": "^2.16.0",
76
- "@sveltejs/package": "^2.0.0",
77
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
78
- "@testing-library/jest-dom": "^6.6.3",
79
- "@testing-library/svelte": "^5.2.4",
80
- "eslint": "^9.18.0",
81
- "eslint-config-prettier": "^10.0.1",
82
- "eslint-plugin-svelte": "^3.0.0",
83
- "globals": "^16.0.0",
84
- "jsdom": "^26.0.0",
85
- "prettier": "^3.4.2",
86
- "prettier-plugin-svelte": "^3.3.3",
87
- "publint": "^0.3.2",
88
- "svelte": "^5.0.0",
89
- "svelte-check": "^4.0.0",
90
- "typescript": "^5.0.0",
91
- "typescript-eslint": "^8.20.0",
92
- "vite": "^6.2.6",
93
- "vitest": "^3.0.0",
94
- "@commitlint/cli": "^19.7.1",
95
- "semantic-release": "^24.2.3",
96
- "@semantic-release/git": "^10.0.1",
97
- "git-cz": "^4.9.0",
98
- "husky": "^9.1.7",
71
+ "@commitlint/cli": "^20.5.0",
72
+ "@eslint/compat": "^2.0.5",
73
+ "@eslint/js": "^10.0.1",
74
+ "@playwright/test": "^1.59.1",
75
+ "@sveltejs/adapter-auto": "^7.0.1",
76
+ "@sveltejs/kit": "^2.57.1",
77
+ "@sveltejs/package": "^2.5.7",
78
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
79
+ "@testing-library/jest-dom": "^6.9.1",
80
+ "@testing-library/svelte": "^5.3.1",
99
81
  "commander": "^13.1.0",
100
82
  "commitizen": "^4.3.1",
101
- "env-cmd": "^10.1.0"
83
+ "eslint": "^10.2.1",
84
+ "eslint-config-prettier": "^10.1.8",
85
+ "eslint-plugin-svelte": "^3.17.0",
86
+ "git-cz": "^4.9.0",
87
+ "globals": "^17.5.0",
88
+ "husky": "^9.1.7",
89
+ "jsdom": "^29.0.2",
90
+ "prettier": "^3.8.3",
91
+ "prettier-plugin-svelte": "^3.5.1",
92
+ "publint": "^0.3.18",
93
+ "svelte": "^5.55.4",
94
+ "svelte-check": "^4.4.6",
95
+ "typescript": "^5.0.0",
96
+ "typescript-eslint": "^8.58.2",
97
+ "vite": "^8.0.8",
98
+ "vitest": "^4.1.4"
102
99
  },
103
100
  "config": {
104
101
  "commitizen": {
@@ -109,10 +106,9 @@
109
106
  "svelte"
110
107
  ],
111
108
  "dependencies": {
112
- "azure-net-tools": "^1.2.1",
113
- "edges-svelte": "^3.0.3",
114
- "edges-svelte-translations": "^3.0.0",
115
- "ky": "^1.14.3"
109
+ "@azure-net/edges": "^1.2.0",
110
+ "@azure-net/edges-translations": "^1.2.0",
111
+ "@azure-net/tools": "^1.2.0"
116
112
  },
117
113
  "scripts": {
118
114
  "dev": "vite dev",
@@ -122,12 +118,10 @@
122
118
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
123
119
  "format": "prettier --write .",
124
120
  "lint": "prettier --check . && eslint .",
125
- "test:unit": "vitest",
121
+ "test:unit": "vitest --config vitest.config.ts",
122
+ "test:integration": "vitest --config vitest.integration.config.ts --run",
126
123
  "test": "npm run test:unit -- --run && npm run test:e2e",
127
- "test:e2e": "playwright test",
128
- "semantic-release": "env-cmd semantic-release",
129
- "precommit": "pnpm lint && pnpm check",
130
- "commit": "pnpm format && git add . && git-cz && git push",
131
- "release": "pnpm commit && pnpm semantic-release"
124
+ "test:e2e": "playwright test --pass-with-no-tests",
125
+ "commit": "pnpm format && git add . && git-cz && git push"
132
126
  }
133
127
  }