@stryke/trpc-next 0.5.48 → 0.5.50

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 (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +29 -1
  3. package/dist/action-handler.cjs +20 -1
  4. package/dist/action-handler.mjs +18 -1
  5. package/dist/action-handler.mjs.map +1 -1
  6. package/dist/client.cjs +39 -1
  7. package/dist/client.mjs +37 -1
  8. package/dist/client.mjs.map +1 -1
  9. package/dist/env/src/ci-checks.cjs +13 -1
  10. package/dist/env/src/ci-checks.mjs +12 -1
  11. package/dist/env/src/ci-checks.mjs.map +1 -1
  12. package/dist/env/src/environment-checks.cjs +87 -1
  13. package/dist/env/src/environment-checks.mjs +87 -1
  14. package/dist/env/src/environment-checks.mjs.map +1 -1
  15. package/dist/index.cjs +30 -1
  16. package/dist/index.mjs +8 -1
  17. package/dist/path/src/is-type.cjs +28 -1
  18. package/dist/path/src/is-type.mjs +28 -1
  19. package/dist/path/src/is-type.mjs.map +1 -1
  20. package/dist/path/src/join-paths.cjs +106 -1
  21. package/dist/path/src/join-paths.mjs +106 -1
  22. package/dist/path/src/join-paths.mjs.map +1 -1
  23. package/dist/path/src/regex.cjs +12 -1
  24. package/dist/path/src/regex.mjs +8 -1
  25. package/dist/path/src/regex.mjs.map +1 -1
  26. package/dist/path/src/slash.cjs +15 -1
  27. package/dist/path/src/slash.mjs +14 -1
  28. package/dist/path/src/slash.mjs.map +1 -1
  29. package/dist/server.cjs +46 -1
  30. package/dist/server.mjs +33 -1
  31. package/dist/server.mjs.map +1 -1
  32. package/dist/shared.cjs +43 -1
  33. package/dist/shared.mjs +38 -1
  34. package/dist/shared.mjs.map +1 -1
  35. package/dist/shield/constructors.cjs +86 -1
  36. package/dist/shield/constructors.mjs +79 -1
  37. package/dist/shield/constructors.mjs.map +1 -1
  38. package/dist/shield/generator.cjs +28 -1
  39. package/dist/shield/generator.mjs +27 -1
  40. package/dist/shield/generator.mjs.map +1 -1
  41. package/dist/shield/index.cjs +12 -1
  42. package/dist/shield/index.mjs +4 -1
  43. package/dist/shield/rules.cjs +200 -1
  44. package/dist/shield/rules.mjs +191 -1
  45. package/dist/shield/rules.mjs.map +1 -1
  46. package/dist/shield/shield.cjs +31 -1
  47. package/dist/shield/shield.mjs +31 -1
  48. package/dist/shield/shield.mjs.map +1 -1
  49. package/dist/shield/utils.cjs +56 -1
  50. package/dist/shield/utils.mjs +51 -1
  51. package/dist/shield/utils.mjs.map +1 -1
  52. package/dist/shield/validation.cjs +59 -1
  53. package/dist/shield/validation.mjs +58 -1
  54. package/dist/shield/validation.mjs.map +1 -1
  55. package/dist/tanstack-query/client.cjs +42 -1
  56. package/dist/tanstack-query/client.mjs +41 -1
  57. package/dist/tanstack-query/client.mjs.map +1 -1
  58. package/dist/tanstack-query/server.cjs +54 -1
  59. package/dist/tanstack-query/server.mjs +51 -1
  60. package/dist/tanstack-query/server.mjs.map +1 -1
  61. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  # Changelog for Stryke - TRPC Next
4
4
 
5
+ ## [0.5.49](https://github.com/storm-software/stryke/releases/tag/trpc-next%400.5.49) (01/16/2026)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **types** to **v0.10.33**
10
+ - Updated **path** to **v0.25.1**
11
+ - Updated **env** to **v0.20.50**
12
+ - Updated **url** to **v0.3.27**
13
+
14
+ ## [0.5.48](https://github.com/storm-software/stryke/releases/tag/trpc-next%400.5.48) (01/16/2026)
15
+
16
+ ### Updated Dependencies
17
+
18
+ - Updated **path** to **v0.25.0**
19
+ - Updated **env** to **v0.20.49**
20
+ - Updated **url** to **v0.3.26**
21
+
5
22
  ## [0.5.47](https://github.com/storm-software/stryke/releases/tag/trpc-next%400.5.47) (01/16/2026)
6
23
 
7
24
  ### Updated Dependencies
@@ -1 +1,29 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -1 +1,20 @@
1
- const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@trpc/next/app-dir/server`),n=require(`defu`);n=e.__toESM(n);function r(e,r,i=async()=>({})){return(0,t.experimental_createServerActionHandler)(r,{createContext:async()=>(0,n.default)(await Promise.resolve(i()),{headers:{cookies:(await e()).toString()??``}})})}exports.createTRPCServerActionHandler=r;
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ let __trpc_next_app_dir_server = require("@trpc/next/app-dir/server");
3
+ let defu = require("defu");
4
+ defu = require_rolldown_runtime.__toESM(defu);
5
+
6
+ //#region src/action-handler.ts
7
+ /**
8
+ * This client invokes procedures directly on the server without fetching over HTTP.
9
+ *
10
+ * @param t - The tRPC instance
11
+ * @param createContext - An optional function to generate a context
12
+ */
13
+ function createTRPCServerActionHandler(cookies, t, createContext = async () => ({})) {
14
+ return (0, __trpc_next_app_dir_server.experimental_createServerActionHandler)(t, { createContext: async () => {
15
+ return (0, defu.default)(await Promise.resolve(createContext()), { headers: { cookies: (await cookies()).toString() ?? "" } });
16
+ } });
17
+ }
18
+
19
+ //#endregion
20
+ exports.createTRPCServerActionHandler = createTRPCServerActionHandler;
@@ -1,2 +1,19 @@
1
- import{experimental_createServerActionHandler as e}from"@trpc/next/app-dir/server";import t from"defu";function n(n,r,i=async()=>({})){return e(r,{createContext:async()=>t(await Promise.resolve(i()),{headers:{cookies:(await n()).toString()??``}})})}export{n as createTRPCServerActionHandler};
1
+ import { experimental_createServerActionHandler } from "@trpc/next/app-dir/server";
2
+ import defu from "defu";
3
+
4
+ //#region src/action-handler.ts
5
+ /**
6
+ * This client invokes procedures directly on the server without fetching over HTTP.
7
+ *
8
+ * @param t - The tRPC instance
9
+ * @param createContext - An optional function to generate a context
10
+ */
11
+ function createTRPCServerActionHandler(cookies, t, createContext = async () => ({})) {
12
+ return experimental_createServerActionHandler(t, { createContext: async () => {
13
+ return defu(await Promise.resolve(createContext()), { headers: { cookies: (await cookies()).toString() ?? "" } });
14
+ } });
15
+ }
16
+
17
+ //#endregion
18
+ export { createTRPCServerActionHandler };
2
19
  //# sourceMappingURL=action-handler.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-handler.mjs","names":[],"sources":["../src/action-handler.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable camelcase */\n\nimport type { MaybePromise } from \"@stryke/types\";\nimport { experimental_createServerActionHandler } from \"@trpc/next/app-dir/server\";\nimport type {\n AnyRootTypes,\n RootConfig\n} from \"@trpc/server/unstable-core-do-not-import\";\nimport defu from \"defu\";\nimport type { ReadonlyRequestCookies } from \"next/dist/server/web/spec-extension/adapters/request-cookies\";\nimport type { BaseContext } from \"./types\";\n\n/**\n * This client invokes procedures directly on the server without fetching over HTTP.\n *\n * @param t - The tRPC instance\n * @param createContext - An optional function to generate a context\n */\nexport function createTRPCServerActionHandler<\n TInstance extends {\n _config: RootConfig<AnyRootTypes>;\n },\n TContext extends BaseContext = BaseContext\n>(\n cookies: () => Promise<ReadonlyRequestCookies>,\n t: TInstance,\n createContext: () => MaybePromise<TContext> = async () => ({}) as TContext\n) {\n return experimental_createServerActionHandler(t, {\n createContext: async () => {\n const context = await Promise.resolve(createContext());\n\n return defu(context, {\n headers: {\n // Pass the cookie header to the API\n cookies: (await cookies()).toString() ?? \"\"\n }\n });\n }\n });\n}\n"],"mappings":"uGAoCA,SAAgB,EAMd,EACA,EACA,EAA8C,UAAa,EAAE,EAC7D,CACA,OAAO,EAAuC,EAAG,CAC/C,cAAe,SAGN,EAFS,MAAM,QAAQ,QAAQ,GAAe,CAAC,CAEjC,CACnB,QAAS,CAEP,SAAU,MAAM,GAAS,EAAE,UAAU,EAAI,GAC1C,CACF,CAAC,CAEL,CAAC"}
1
+ {"version":3,"file":"action-handler.mjs","names":[],"sources":["../src/action-handler.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable camelcase */\n\nimport type { MaybePromise } from \"@stryke/types\";\nimport { experimental_createServerActionHandler } from \"@trpc/next/app-dir/server\";\nimport type {\n AnyRootTypes,\n RootConfig\n} from \"@trpc/server/unstable-core-do-not-import\";\nimport defu from \"defu\";\nimport type { ReadonlyRequestCookies } from \"next/dist/server/web/spec-extension/adapters/request-cookies\";\nimport type { BaseContext } from \"./types\";\n\n/**\n * This client invokes procedures directly on the server without fetching over HTTP.\n *\n * @param t - The tRPC instance\n * @param createContext - An optional function to generate a context\n */\nexport function createTRPCServerActionHandler<\n TInstance extends {\n _config: RootConfig<AnyRootTypes>;\n },\n TContext extends BaseContext = BaseContext\n>(\n cookies: () => Promise<ReadonlyRequestCookies>,\n t: TInstance,\n createContext: () => MaybePromise<TContext> = async () => ({}) as TContext\n) {\n return experimental_createServerActionHandler(t, {\n createContext: async () => {\n const context = await Promise.resolve(createContext());\n\n return defu(context, {\n headers: {\n // Pass the cookie header to the API\n cookies: (await cookies()).toString() ?? \"\"\n }\n });\n }\n });\n}\n"],"mappings":";;;;;;;;;;AAoCA,SAAgB,8BAMd,SACA,GACA,gBAA8C,aAAa,EAAE,GAC7D;AACA,QAAO,uCAAuC,GAAG,EAC/C,eAAe,YAAY;AAGzB,SAAO,KAFS,MAAM,QAAQ,QAAQ,eAAe,CAAC,EAEjC,EACnB,SAAS,EAEP,UAAU,MAAM,SAAS,EAAE,UAAU,IAAI,IAC1C,EACF,CAAC;IAEL,CAAC"}
package/dist/client.cjs CHANGED
@@ -1 +1,39 @@
1
- "use client";const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./shared.cjs`);let n=require(`@trpc/client`),r=require(`@trpc/next/app-dir/client`),i=require(`@trpc/next/app-dir/links/nextHttp`);function a(e){return(0,r.experimental_createTRPCNextAppDirClient)({config(){return{links:[(0,n.loggerLink)({enabled:e=>!0}),(0,i.experimental_nextHttpLink)({transformer:t.transformer,batch:!0,url:t.getTRPCServerUrl(e),headers(){return{"x-trpc-source":`client`}}})]}}})}function o(){return(0,r.experimental_createActionHook)({links:[(0,n.loggerLink)(),(0,r.experimental_serverActionLink)({transformer:t.transformer})]})}exports.createTRPCClient=a,exports.createUseAction=o;
1
+ "use client";
2
+
3
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
4
+ const require_shared = require('./shared.cjs');
5
+ let __trpc_client = require("@trpc/client");
6
+ let __trpc_next_app_dir_client = require("@trpc/next/app-dir/client");
7
+ let __trpc_next_app_dir_links_nextHttp = require("@trpc/next/app-dir/links/nextHttp");
8
+
9
+ //#region src/client.ts
10
+ /**
11
+ * Creates a tRPC client for the Next.js app directory.
12
+ *
13
+ * @param baseUrl - The base URL for the tRPC server. This is typically the URL of the Next.js app.
14
+ * @returns A tRPC client that can be used to make requests to the server.
15
+ */
16
+ function createTRPCClient(baseUrl) {
17
+ return (0, __trpc_next_app_dir_client.experimental_createTRPCNextAppDirClient)({ config() {
18
+ return { links: [(0, __trpc_client.loggerLink)({ enabled: (_op) => true }), (0, __trpc_next_app_dir_links_nextHttp.experimental_nextHttpLink)({
19
+ transformer: require_shared.transformer,
20
+ batch: true,
21
+ url: require_shared.getTRPCServerUrl(baseUrl),
22
+ headers() {
23
+ return { "x-trpc-source": "client" };
24
+ }
25
+ })] };
26
+ } });
27
+ }
28
+ /**
29
+ * Creates a tRPC action hook for the Next.js app directory.
30
+ *
31
+ * @returns A function that can be used to create a tRPC action hook.
32
+ */
33
+ function createUseAction() {
34
+ return (0, __trpc_next_app_dir_client.experimental_createActionHook)({ links: [(0, __trpc_client.loggerLink)(), (0, __trpc_next_app_dir_client.experimental_serverActionLink)({ transformer: require_shared.transformer })] });
35
+ }
36
+
37
+ //#endregion
38
+ exports.createTRPCClient = createTRPCClient;
39
+ exports.createUseAction = createUseAction;
package/dist/client.mjs CHANGED
@@ -1,2 +1,38 @@
1
- "use client";import{getTRPCServerUrl as e,transformer as t}from"./shared.mjs";import{loggerLink as n}from"@trpc/client";import{experimental_createActionHook as r,experimental_createTRPCNextAppDirClient as i,experimental_serverActionLink as a}from"@trpc/next/app-dir/client";import{experimental_nextHttpLink as o}from"@trpc/next/app-dir/links/nextHttp";function s(r){return i({config(){return{links:[n({enabled:e=>!0}),o({transformer:t,batch:!0,url:e(r),headers(){return{"x-trpc-source":`client`}}})]}}})}function c(){return r({links:[n(),a({transformer:t})]})}export{s as createTRPCClient,c as createUseAction};
1
+ "use client";
2
+
3
+ import { getTRPCServerUrl, transformer } from "./shared.mjs";
4
+ import { loggerLink } from "@trpc/client";
5
+ import { experimental_createActionHook, experimental_createTRPCNextAppDirClient, experimental_serverActionLink } from "@trpc/next/app-dir/client";
6
+ import { experimental_nextHttpLink } from "@trpc/next/app-dir/links/nextHttp";
7
+
8
+ //#region src/client.ts
9
+ /**
10
+ * Creates a tRPC client for the Next.js app directory.
11
+ *
12
+ * @param baseUrl - The base URL for the tRPC server. This is typically the URL of the Next.js app.
13
+ * @returns A tRPC client that can be used to make requests to the server.
14
+ */
15
+ function createTRPCClient(baseUrl) {
16
+ return experimental_createTRPCNextAppDirClient({ config() {
17
+ return { links: [loggerLink({ enabled: (_op) => true }), experimental_nextHttpLink({
18
+ transformer,
19
+ batch: true,
20
+ url: getTRPCServerUrl(baseUrl),
21
+ headers() {
22
+ return { "x-trpc-source": "client" };
23
+ }
24
+ })] };
25
+ } });
26
+ }
27
+ /**
28
+ * Creates a tRPC action hook for the Next.js app directory.
29
+ *
30
+ * @returns A function that can be used to create a tRPC action hook.
31
+ */
32
+ function createUseAction() {
33
+ return experimental_createActionHook({ links: [loggerLink(), experimental_serverActionLink({ transformer })] });
34
+ }
35
+
36
+ //#endregion
37
+ export { createTRPCClient, createUseAction };
2
38
  //# sourceMappingURL=client.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n\"use client\";\n\n/* eslint-disable camelcase */\n\nimport { loggerLink } from \"@trpc/client\";\nimport type { UseTRPCActionResult } from \"@trpc/next/app-dir/client\";\nimport {\n experimental_createActionHook,\n experimental_createTRPCNextAppDirClient,\n experimental_serverActionLink\n} from \"@trpc/next/app-dir/client\";\nimport { experimental_nextHttpLink } from \"@trpc/next/app-dir/links/nextHttp\";\nimport type {\n ActionHandlerDef,\n TRPCActionHandler\n} from \"@trpc/next/app-dir/server\";\nimport type { AnyTRPCRouter } from \"@trpc/server\";\nimport { getTRPCServerUrl, transformer } from \"./shared\";\n\n/**\n * Creates a tRPC client for the Next.js app directory.\n *\n * @param baseUrl - The base URL for the tRPC server. This is typically the URL of the Next.js app.\n * @returns A tRPC client that can be used to make requests to the server.\n */\nexport function createTRPCClient<TRouter extends AnyTRPCRouter>(\n baseUrl: string\n) {\n return experimental_createTRPCNextAppDirClient<TRouter>({\n config() {\n return {\n links: [\n loggerLink({\n enabled: _op => true\n }),\n experimental_nextHttpLink({\n transformer,\n batch: true,\n url: getTRPCServerUrl(baseUrl),\n headers() {\n return {\n \"x-trpc-source\": \"client\"\n };\n }\n } as TRouter[\"_def\"][\"_config\"][\"$types\"])\n ]\n };\n }\n });\n}\n\n/**\n * Creates a tRPC action hook for the Next.js app directory.\n *\n * @returns A function that can be used to create a tRPC action hook.\n */\nexport function createUseAction<TRouter extends AnyTRPCRouter>() {\n return experimental_createActionHook<TRouter>({\n links: [\n loggerLink(),\n experimental_serverActionLink({\n transformer\n } as TRouter[\"_def\"][\"_config\"][\"$types\"])\n ]\n } as TRouter[\"_def\"][\"_config\"][\"$types\"]) as <TDef extends ActionHandlerDef>(\n handler: TRPCActionHandler<TDef>,\n useActionOpts?: any\n ) => UseTRPCActionResult<TDef>;\n}\n"],"mappings":"gWA2CA,SAAgB,EACd,EACA,CACA,OAAO,EAAiD,CACtD,QAAS,CACP,MAAO,CACL,MAAO,CACL,EAAW,CACT,QAAS,GAAO,GACjB,CAAC,CACF,EAA0B,CACxB,cACA,MAAO,GACP,IAAK,EAAiB,EAAQ,CAC9B,SAAU,CACR,MAAO,CACL,gBAAiB,SAClB,EAEJ,CAAyC,CAC3C,CACF,EAEJ,CAAC,CAQJ,SAAgB,GAAiD,CAC/D,OAAO,EAAuC,CAC5C,MAAO,CACL,GAAY,CACZ,EAA8B,CAC5B,cACD,CAAyC,CAC3C,CACF,CAAyC"}
1
+ {"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n\"use client\";\n\n/* eslint-disable camelcase */\n\nimport { loggerLink } from \"@trpc/client\";\nimport type { UseTRPCActionResult } from \"@trpc/next/app-dir/client\";\nimport {\n experimental_createActionHook,\n experimental_createTRPCNextAppDirClient,\n experimental_serverActionLink\n} from \"@trpc/next/app-dir/client\";\nimport { experimental_nextHttpLink } from \"@trpc/next/app-dir/links/nextHttp\";\nimport type {\n ActionHandlerDef,\n TRPCActionHandler\n} from \"@trpc/next/app-dir/server\";\nimport type { AnyTRPCRouter } from \"@trpc/server\";\nimport { getTRPCServerUrl, transformer } from \"./shared\";\n\n/**\n * Creates a tRPC client for the Next.js app directory.\n *\n * @param baseUrl - The base URL for the tRPC server. This is typically the URL of the Next.js app.\n * @returns A tRPC client that can be used to make requests to the server.\n */\nexport function createTRPCClient<TRouter extends AnyTRPCRouter>(\n baseUrl: string\n) {\n return experimental_createTRPCNextAppDirClient<TRouter>({\n config() {\n return {\n links: [\n loggerLink({\n enabled: _op => true\n }),\n experimental_nextHttpLink({\n transformer,\n batch: true,\n url: getTRPCServerUrl(baseUrl),\n headers() {\n return {\n \"x-trpc-source\": \"client\"\n };\n }\n } as TRouter[\"_def\"][\"_config\"][\"$types\"])\n ]\n };\n }\n });\n}\n\n/**\n * Creates a tRPC action hook for the Next.js app directory.\n *\n * @returns A function that can be used to create a tRPC action hook.\n */\nexport function createUseAction<TRouter extends AnyTRPCRouter>() {\n return experimental_createActionHook<TRouter>({\n links: [\n loggerLink(),\n experimental_serverActionLink({\n transformer\n } as TRouter[\"_def\"][\"_config\"][\"$types\"])\n ]\n } as TRouter[\"_def\"][\"_config\"][\"$types\"]) as <TDef extends ActionHandlerDef>(\n handler: TRPCActionHandler<TDef>,\n useActionOpts?: any\n ) => UseTRPCActionResult<TDef>;\n}\n"],"mappings":";;;;;;;;;;;;;;AA2CA,SAAgB,iBACd,SACA;AACA,QAAO,wCAAiD,EACtD,SAAS;AACP,SAAO,EACL,OAAO,CACL,WAAW,EACT,UAAS,QAAO,MACjB,CAAC,EACF,0BAA0B;GACxB;GACA,OAAO;GACP,KAAK,iBAAiB,QAAQ;GAC9B,UAAU;AACR,WAAO,EACL,iBAAiB,UAClB;;GAEJ,CAAyC,CAC3C,EACF;IAEJ,CAAC;;;;;;;AAQJ,SAAgB,kBAAiD;AAC/D,QAAO,8BAAuC,EAC5C,OAAO,CACL,YAAY,EACZ,8BAA8B,EAC5B,aACD,CAAyC,CAC3C,EACF,CAAyC"}
@@ -1 +1,13 @@
1
- const e=(e=process.env)=>!!(e.STORM_CI||e.CI||e.CONTINUOUS_INTEGRATION||e.BUILD_NUMBER||e.RUN_ID||e.AGOLA_GIT_REF||e.AC_APPCIRCLE||e.APPVEYOR||e.CODEBUILD||e.TF_BUILD||e.bamboo_planKey||e.BITBUCKET_COMMIT||e.BITRISE_IO||e.BUDDY_WORKSPACE_ID||e.BUILDKITE||e.CIRCLECI||e.CIRRUS_CI||e.CF_BUILD_ID||e.CM_BUILD_ID||e.CI_NAME||e.DRONE||e.DSARI||e.EARTHLY_CI||e.EAS_BUILD||e.GERRIT_PROJECT||e.GITEA_ACTIONS||e.GITHUB_ACTIONS||e.GITLAB_CI||e.GOCD||e.BUILDER_OUTPUT||e.HARNESS_BUILD_ID||e.JENKINS_URL||e.BUILD_ID||e.LAYERCI||e.MAGNUM||e.NETLIFY||e.NEVERCODE||e.PROW_JOB_ID||e.RELEASE_BUILD_ID||e.RENDER||e.SAILCI||e.HUDSON||e.JENKINS_URL||e.BUILD_ID||e.SCREWDRIVER||e.SEMAPHORE||e.SOURCEHUT||e.STRIDER||e.TASK_ID||e.RUN_ID||e.TEAMCITY_VERSION||e.TRAVIS||e.VELA||e.NOW_BUILDER||e.APPCENTER_BUILD_ID||e.CI_XCODE_PROJECT||e.XCS);exports.isCI=e;
1
+
2
+ //#region ../env/src/ci-checks.ts
3
+ /**
4
+ * Returns true if the current environment is a CI environment.
5
+ *
6
+ * @returns True if the current environment is a CI environment.
7
+ */
8
+ const isCI = (env = process.env) => {
9
+ return Boolean(env.STORM_CI || env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || env.AGOLA_GIT_REF || env.AC_APPCIRCLE || env.APPVEYOR || env.CODEBUILD || env.TF_BUILD || env.bamboo_planKey || env.BITBUCKET_COMMIT || env.BITRISE_IO || env.BUDDY_WORKSPACE_ID || env.BUILDKITE || env.CIRCLECI || env.CIRRUS_CI || env.CF_BUILD_ID || env.CM_BUILD_ID || env.CI_NAME || env.DRONE || env.DSARI || env.EARTHLY_CI || env.EAS_BUILD || env.GERRIT_PROJECT || env.GITEA_ACTIONS || env.GITHUB_ACTIONS || env.GITLAB_CI || env.GOCD || env.BUILDER_OUTPUT || env.HARNESS_BUILD_ID || env.JENKINS_URL || env.BUILD_ID || env.LAYERCI || env.MAGNUM || env.NETLIFY || env.NEVERCODE || env.PROW_JOB_ID || env.RELEASE_BUILD_ID || env.RENDER || env.SAILCI || env.HUDSON || env.JENKINS_URL || env.BUILD_ID || env.SCREWDRIVER || env.SEMAPHORE || env.SOURCEHUT || env.STRIDER || env.TASK_ID || env.RUN_ID || env.TEAMCITY_VERSION || env.TRAVIS || env.VELA || env.NOW_BUILDER || env.APPCENTER_BUILD_ID || env.CI_XCODE_PROJECT || env.XCS || false);
10
+ };
11
+
12
+ //#endregion
13
+ exports.isCI = isCI;
@@ -1,2 +1,13 @@
1
- const e=(e=process.env)=>!!(e.STORM_CI||e.CI||e.CONTINUOUS_INTEGRATION||e.BUILD_NUMBER||e.RUN_ID||e.AGOLA_GIT_REF||e.AC_APPCIRCLE||e.APPVEYOR||e.CODEBUILD||e.TF_BUILD||e.bamboo_planKey||e.BITBUCKET_COMMIT||e.BITRISE_IO||e.BUDDY_WORKSPACE_ID||e.BUILDKITE||e.CIRCLECI||e.CIRRUS_CI||e.CF_BUILD_ID||e.CM_BUILD_ID||e.CI_NAME||e.DRONE||e.DSARI||e.EARTHLY_CI||e.EAS_BUILD||e.GERRIT_PROJECT||e.GITEA_ACTIONS||e.GITHUB_ACTIONS||e.GITLAB_CI||e.GOCD||e.BUILDER_OUTPUT||e.HARNESS_BUILD_ID||e.JENKINS_URL||e.BUILD_ID||e.LAYERCI||e.MAGNUM||e.NETLIFY||e.NEVERCODE||e.PROW_JOB_ID||e.RELEASE_BUILD_ID||e.RENDER||e.SAILCI||e.HUDSON||e.JENKINS_URL||e.BUILD_ID||e.SCREWDRIVER||e.SEMAPHORE||e.SOURCEHUT||e.STRIDER||e.TASK_ID||e.RUN_ID||e.TEAMCITY_VERSION||e.TRAVIS||e.VELA||e.NOW_BUILDER||e.APPCENTER_BUILD_ID||e.CI_XCODE_PROJECT||e.XCS);export{e as isCI};
1
+ //#region ../env/src/ci-checks.ts
2
+ /**
3
+ * Returns true if the current environment is a CI environment.
4
+ *
5
+ * @returns True if the current environment is a CI environment.
6
+ */
7
+ const isCI = (env = process.env) => {
8
+ return Boolean(env.STORM_CI || env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || env.AGOLA_GIT_REF || env.AC_APPCIRCLE || env.APPVEYOR || env.CODEBUILD || env.TF_BUILD || env.bamboo_planKey || env.BITBUCKET_COMMIT || env.BITRISE_IO || env.BUDDY_WORKSPACE_ID || env.BUILDKITE || env.CIRCLECI || env.CIRRUS_CI || env.CF_BUILD_ID || env.CM_BUILD_ID || env.CI_NAME || env.DRONE || env.DSARI || env.EARTHLY_CI || env.EAS_BUILD || env.GERRIT_PROJECT || env.GITEA_ACTIONS || env.GITHUB_ACTIONS || env.GITLAB_CI || env.GOCD || env.BUILDER_OUTPUT || env.HARNESS_BUILD_ID || env.JENKINS_URL || env.BUILD_ID || env.LAYERCI || env.MAGNUM || env.NETLIFY || env.NEVERCODE || env.PROW_JOB_ID || env.RELEASE_BUILD_ID || env.RENDER || env.SAILCI || env.HUDSON || env.JENKINS_URL || env.BUILD_ID || env.SCREWDRIVER || env.SEMAPHORE || env.SOURCEHUT || env.STRIDER || env.TASK_ID || env.RUN_ID || env.TEAMCITY_VERSION || env.TRAVIS || env.VELA || env.NOW_BUILDER || env.APPCENTER_BUILD_ID || env.CI_XCODE_PROJECT || env.XCS || false);
9
+ };
10
+
11
+ //#endregion
12
+ export { isCI };
2
13
  //# sourceMappingURL=ci-checks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci-checks.mjs","names":[],"sources":["../../../../env/src/ci-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Returns true if the current environment is a CI environment.\n *\n * @returns True if the current environment is a CI environment.\n */\nexport const isCI = (\n env: Record<string, string | undefined> = process.env\n): boolean => {\n // From https://github.com/watson/ci-info/blob/44e98cebcdf4403f162195fbcf90b1f69fc6e047/index.js#L54-L61\n // Evaluating at runtime makes it possible to change the values in our tests\n // This list is probably not exhaustive though `process.env.CI` should be enough\n // but since we were using this utility in the past, we want to keep the same behavior\n return Boolean(\n env.STORM_CI || // Custom CI\n env.CI || // Travis CI, CircleCI, Cirrus CI, GitLab CI, Appveyor, CodeShip, dsari\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.RUN_ID || // TaskCluster, dsari\n // From `env` from v4.0.0 https://github.com/watson/ci-info/blob/3e1488e98680f1f776785fe8708a157b7f00e568/vendors.json\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n // See https://github.com/prisma/prisma/issues/22380 for why we commented it out\n // Users deploying on Vercel might have this env var set in the local dev env\n // env.VERCEL ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS ||\n false\n );\n};\n\n// Same logic as https://github.com/sindresorhus/is-interactive/blob/dc8037ae1a61d828cfb42761c345404055b1e036/index.js\n// But defaults to check `stdin` for our prompts\n// It checks that the stream is TTY, not a dumb terminal\n\n/**\n * Check if the current process is interactive\n *\n * @param stream - The stream to check\n * @returns True if the current process is interactive\n */\nexport const isInteractive = (stream = process.stdin): boolean => {\n return Boolean(stream?.isTTY && process.env.TERM !== \"dumb\");\n};\n"],"mappings":"AAuBA,MAAa,GACX,EAA0C,QAAQ,MAM3C,GACL,EAAI,UACJ,EAAI,IACJ,EAAI,wBACJ,EAAI,cACJ,EAAI,QAEJ,EAAI,eACJ,EAAI,cACJ,EAAI,UACJ,EAAI,WACJ,EAAI,UACJ,EAAI,gBACJ,EAAI,kBACJ,EAAI,YACJ,EAAI,oBACJ,EAAI,WACJ,EAAI,UACJ,EAAI,WACJ,EAAI,aACJ,EAAI,aACJ,EAAI,SACJ,EAAI,OACJ,EAAI,OACJ,EAAI,YACJ,EAAI,WACJ,EAAI,gBACJ,EAAI,eACJ,EAAI,gBACJ,EAAI,WACJ,EAAI,MACJ,EAAI,gBACJ,EAAI,kBACJ,EAAI,aACJ,EAAI,UACJ,EAAI,SACJ,EAAI,QACJ,EAAI,SACJ,EAAI,WACJ,EAAI,aACJ,EAAI,kBACJ,EAAI,QACJ,EAAI,QACJ,EAAI,QACJ,EAAI,aACJ,EAAI,UACJ,EAAI,aACJ,EAAI,WACJ,EAAI,WACJ,EAAI,SACJ,EAAI,SACJ,EAAI,QACJ,EAAI,kBACJ,EAAI,QACJ,EAAI,MACJ,EAAI,aAIJ,EAAI,oBACJ,EAAI,kBACJ,EAAI"}
1
+ {"version":3,"file":"ci-checks.mjs","names":[],"sources":["../../../../env/src/ci-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Returns true if the current environment is a CI environment.\n *\n * @returns True if the current environment is a CI environment.\n */\nexport const isCI = (\n env: Record<string, string | undefined> = process.env\n): boolean => {\n // From https://github.com/watson/ci-info/blob/44e98cebcdf4403f162195fbcf90b1f69fc6e047/index.js#L54-L61\n // Evaluating at runtime makes it possible to change the values in our tests\n // This list is probably not exhaustive though `process.env.CI` should be enough\n // but since we were using this utility in the past, we want to keep the same behavior\n return Boolean(\n env.STORM_CI || // Custom CI\n env.CI || // Travis CI, CircleCI, Cirrus CI, GitLab CI, Appveyor, CodeShip, dsari\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.RUN_ID || // TaskCluster, dsari\n // From `env` from v4.0.0 https://github.com/watson/ci-info/blob/3e1488e98680f1f776785fe8708a157b7f00e568/vendors.json\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n // See https://github.com/prisma/prisma/issues/22380 for why we commented it out\n // Users deploying on Vercel might have this env var set in the local dev env\n // env.VERCEL ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS ||\n false\n );\n};\n\n// Same logic as https://github.com/sindresorhus/is-interactive/blob/dc8037ae1a61d828cfb42761c345404055b1e036/index.js\n// But defaults to check `stdin` for our prompts\n// It checks that the stream is TTY, not a dumb terminal\n\n/**\n * Check if the current process is interactive\n *\n * @param stream - The stream to check\n * @returns True if the current process is interactive\n */\nexport const isInteractive = (stream = process.stdin): boolean => {\n return Boolean(stream?.isTTY && process.env.TERM !== \"dumb\");\n};\n"],"mappings":";;;;;;AAuBA,MAAa,QACX,MAA0C,QAAQ,QACtC;AAKZ,QAAO,QACL,IAAI,YACJ,IAAI,MACJ,IAAI,0BACJ,IAAI,gBACJ,IAAI,UAEJ,IAAI,iBACJ,IAAI,gBACJ,IAAI,YACJ,IAAI,aACJ,IAAI,YACJ,IAAI,kBACJ,IAAI,oBACJ,IAAI,cACJ,IAAI,sBACJ,IAAI,aACJ,IAAI,YACJ,IAAI,aACJ,IAAI,eACJ,IAAI,eACJ,IAAI,WACJ,IAAI,SACJ,IAAI,SACJ,IAAI,cACJ,IAAI,aACJ,IAAI,kBACJ,IAAI,iBACJ,IAAI,kBACJ,IAAI,aACJ,IAAI,QACJ,IAAI,kBACJ,IAAI,oBACJ,IAAI,eACJ,IAAI,YACJ,IAAI,WACJ,IAAI,UACJ,IAAI,WACJ,IAAI,aACJ,IAAI,eACJ,IAAI,oBACJ,IAAI,UACJ,IAAI,UACJ,IAAI,UACJ,IAAI,eACJ,IAAI,YACJ,IAAI,eACJ,IAAI,aACJ,IAAI,aACJ,IAAI,WACJ,IAAI,WACJ,IAAI,UACJ,IAAI,oBACJ,IAAI,UACJ,IAAI,QACJ,IAAI,eAIJ,IAAI,sBACJ,IAAI,oBACJ,IAAI,OACJ,MACD"}
@@ -1 +1,87 @@
1
- const e=require(`./ci-checks.cjs`),t=process?.platform||``,n=!!(process?.stdout&&process?.stdout.isTTY),r=!!process.env.DEBUG,i=process.env.STORM_MODE||process.env.NEXT_PUBLIC_VERCEL_ENV||process.env.NODE_ENV||`production`,a=[`stg`,`stage`,`staging`].includes(i?.toLowerCase());function o(e){return[`prd`,`prod`,`production`,`preprod`,`preproduction`,`uat`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const s=o(i);function c(e){return[`tst`,`test`,`testing`,`stg`,`stage`,`staging`,`qa`,`qualityassurance`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const l=c(i)||a||!!process.env.TEST;function u(e){return[`dev`,`development`,`int`,`integration`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const d=u(i)||r,f=!!process.env.MINIMAL||e.isCI()||l||!n,p=/^win/i.test(t),m=/^linux/i.test(t),h=/^darwin/i.test(t),g=!process.env.NO_COLOR&&(!!process.env.FORCE_COLOR||(n||p)&&process.env.TERM!==`dumb`||e.isCI()),_=(process?.versions?.node||``).replace(/^v/,``)||null,v=Number(_?.split(`.`)[0])||null;exports.isDevelopment=d;
1
+ const require_ci_checks = require('./ci-checks.cjs');
2
+
3
+ //#region ../env/src/environment-checks.ts
4
+ /** Value of process.platform */
5
+ const platform = process?.platform || "";
6
+ /** Detect if stdout.TTY is available */
7
+ const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);
8
+ /** Detect if `DEBUG` environment variable is set */
9
+ const isDebug = Boolean(process.env.DEBUG);
10
+ /** Detect the `NODE_ENV` environment variable */
11
+ const mode = process.env.STORM_MODE || process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV || "production";
12
+ /** Detect if the application is running in a staging environment */
13
+ const isStaging = [
14
+ "stg",
15
+ "stage",
16
+ "staging"
17
+ ].includes(mode?.toLowerCase());
18
+ /**
19
+ * Check if the current environment is production.
20
+ *
21
+ * @param mode - The mode string to check.
22
+ * @returns Whether the environment is production
23
+ */
24
+ function isProductionMode(mode$1) {
25
+ return [
26
+ "prd",
27
+ "prod",
28
+ "production",
29
+ "preprod",
30
+ "preproduction",
31
+ "uat"
32
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
33
+ }
34
+ /** Detect if `NODE_ENV` environment variable is `production` */
35
+ const isProduction = isProductionMode(mode);
36
+ /**
37
+ * Check if the current environment is test.
38
+ *
39
+ * @param mode - The mode string to check.
40
+ * @returns Whether the environment is test
41
+ */
42
+ function isTestMode(mode$1) {
43
+ return [
44
+ "tst",
45
+ "test",
46
+ "testing",
47
+ "stg",
48
+ "stage",
49
+ "staging",
50
+ "qa",
51
+ "qualityassurance"
52
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
53
+ }
54
+ /** Detect if `NODE_ENV` environment variable is `test` */
55
+ const isTest = isTestMode(mode) || isStaging || Boolean(process.env.TEST);
56
+ /**
57
+ * Check if the current environment is development.
58
+ *
59
+ * @param mode - The mode string to check.
60
+ * @returns Whether the environment is development
61
+ */
62
+ function isDevelopmentMode(mode$1) {
63
+ return [
64
+ "dev",
65
+ "development",
66
+ "int",
67
+ "integration"
68
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
69
+ }
70
+ /** Detect if `NODE_ENV` environment variable is `dev` or `development` */
71
+ const isDevelopment = isDevelopmentMode(mode) || isDebug;
72
+ /** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
73
+ const isMinimal = Boolean(process.env.MINIMAL) || require_ci_checks.isCI() || isTest || !hasTTY;
74
+ /** Detect if process.platform is Windows */
75
+ const isWindows = /^win/i.test(platform);
76
+ /** Detect if process.platform is Linux */
77
+ const isLinux = /^linux/i.test(platform);
78
+ /** Detect if process.platform is macOS (darwin kernel) */
79
+ const isMacOS = /^darwin/i.test(platform);
80
+ /** Color Support */
81
+ const isColorSupported = !process.env.NO_COLOR && (Boolean(process.env.FORCE_COLOR) || (hasTTY || isWindows) && process.env.TERM !== "dumb" || require_ci_checks.isCI());
82
+ /** Node.js versions */
83
+ const nodeVersion = (process?.versions?.node || "").replace(/^v/, "") || null;
84
+ const nodeMajorVersion = Number(nodeVersion?.split(".")[0]) || null;
85
+
86
+ //#endregion
87
+ exports.isDevelopment = isDevelopment;
@@ -1,2 +1,88 @@
1
- import{isCI as e}from"./ci-checks.mjs";const t=process?.platform||``,n=!!(process?.stdout&&process?.stdout.isTTY),r=!!process.env.DEBUG,i=process.env.STORM_MODE||process.env.NEXT_PUBLIC_VERCEL_ENV||process.env.NODE_ENV||`production`,a=[`stg`,`stage`,`staging`].includes(i?.toLowerCase());function o(e){return[`prd`,`prod`,`production`,`preprod`,`preproduction`,`uat`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}o(i);function s(e){return[`tst`,`test`,`testing`,`stg`,`stage`,`staging`,`qa`,`qualityassurance`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}s(i)||a||process.env.TEST;function c(e){return[`dev`,`development`,`int`,`integration`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const l=c(i)||r;process.env.MINIMAL||e();const u=/^win/i.test(t);/^linux/i.test(t),/^darwin/i.test(t),!process.env.NO_COLOR&&(process.env.FORCE_COLOR||(n||u)&&process.env.TERM!==`dumb`||e());const d=(process?.versions?.node||``).replace(/^v/,``)||null;Number(d?.split(`.`)[0]);export{l as isDevelopment};
1
+ import { isCI } from "./ci-checks.mjs";
2
+
3
+ //#region ../env/src/environment-checks.ts
4
+ /** Value of process.platform */
5
+ const platform = process?.platform || "";
6
+ /** Detect if stdout.TTY is available */
7
+ const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);
8
+ /** Detect if `DEBUG` environment variable is set */
9
+ const isDebug = Boolean(process.env.DEBUG);
10
+ /** Detect the `NODE_ENV` environment variable */
11
+ const mode = process.env.STORM_MODE || process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV || "production";
12
+ /** Detect if the application is running in a staging environment */
13
+ const isStaging = [
14
+ "stg",
15
+ "stage",
16
+ "staging"
17
+ ].includes(mode?.toLowerCase());
18
+ /**
19
+ * Check if the current environment is production.
20
+ *
21
+ * @param mode - The mode string to check.
22
+ * @returns Whether the environment is production
23
+ */
24
+ function isProductionMode(mode$1) {
25
+ return [
26
+ "prd",
27
+ "prod",
28
+ "production",
29
+ "preprod",
30
+ "preproduction",
31
+ "uat"
32
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
33
+ }
34
+ /** Detect if `NODE_ENV` environment variable is `production` */
35
+ const isProduction = isProductionMode(mode);
36
+ /**
37
+ * Check if the current environment is test.
38
+ *
39
+ * @param mode - The mode string to check.
40
+ * @returns Whether the environment is test
41
+ */
42
+ function isTestMode(mode$1) {
43
+ return [
44
+ "tst",
45
+ "test",
46
+ "testing",
47
+ "stg",
48
+ "stage",
49
+ "staging",
50
+ "qa",
51
+ "qualityassurance"
52
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
53
+ }
54
+ /** Detect if `NODE_ENV` environment variable is `test` */
55
+ const isTest = isTestMode(mode) || isStaging || Boolean(process.env.TEST);
56
+ /**
57
+ * Check if the current environment is development.
58
+ *
59
+ * @param mode - The mode string to check.
60
+ * @returns Whether the environment is development
61
+ */
62
+ function isDevelopmentMode(mode$1) {
63
+ return [
64
+ "dev",
65
+ "development",
66
+ "int",
67
+ "integration"
68
+ ].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
69
+ }
70
+ /** Detect if `NODE_ENV` environment variable is `dev` or `development` */
71
+ const isDevelopment = isDevelopmentMode(mode) || isDebug;
72
+ /** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
73
+ const isMinimal = Boolean(process.env.MINIMAL) || isCI() || isTest || !hasTTY;
74
+ /** Detect if process.platform is Windows */
75
+ const isWindows = /^win/i.test(platform);
76
+ /** Detect if process.platform is Linux */
77
+ const isLinux = /^linux/i.test(platform);
78
+ /** Detect if process.platform is macOS (darwin kernel) */
79
+ const isMacOS = /^darwin/i.test(platform);
80
+ /** Color Support */
81
+ const isColorSupported = !process.env.NO_COLOR && (Boolean(process.env.FORCE_COLOR) || (hasTTY || isWindows) && process.env.TERM !== "dumb" || isCI());
82
+ /** Node.js versions */
83
+ const nodeVersion = (process?.versions?.node || "").replace(/^v/, "") || null;
84
+ const nodeMajorVersion = Number(nodeVersion?.split(".")[0]) || null;
85
+
86
+ //#endregion
87
+ export { isDevelopment };
2
88
  //# sourceMappingURL=environment-checks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment-checks.mjs","names":["mode"],"sources":["../../../../env/src/environment-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isCI } from \"./ci-checks\";\n\n/** Value of process.platform */\nexport const platform = process?.platform || \"\";\n\n/** Detect if stdout.TTY is available */\nexport const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);\n\n/** Detect if `DEBUG` environment variable is set */\nexport const isDebug = Boolean(process.env.DEBUG);\n\n/** Detect the `NODE_ENV` environment variable */\nconst mode =\n process.env.STORM_MODE ||\n process.env.NEXT_PUBLIC_VERCEL_ENV ||\n process.env.NODE_ENV ||\n \"production\";\n\n/** Detect if the application is running in a staging environment */\nexport const isStaging = [\"stg\", \"stage\", \"staging\"].includes(\n mode?.toLowerCase()\n);\n\n/**\n * Check if the current environment is production.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is production\n */\nexport function isProductionMode(mode: string) {\n return [\n \"prd\",\n \"prod\",\n \"production\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preprod\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preproduction\",\n \"uat\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `production` */\nexport const isProduction = isProductionMode(mode);\n\n/**\n * Check if the current environment is test.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is test\n */\nexport function isTestMode(mode: string) {\n return [\n \"tst\",\n \"test\",\n \"testing\",\n \"stg\",\n \"stage\",\n \"staging\",\n \"qa\",\n // eslint-disable-next-line @cspell/spellchecker\n \"qualityassurance\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `test` */\nexport const isTest =\n isTestMode(mode) || isStaging || Boolean(process.env.TEST);\n\n/**\n * Check if the current environment is development.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is development\n */\nexport function isDevelopmentMode(mode: string) {\n return [\"dev\", \"development\", \"int\", \"integration\"].includes(\n mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\")\n );\n}\n\n/** Detect if `NODE_ENV` environment variable is `dev` or `development` */\nexport const isDevelopment = isDevelopmentMode(mode) || isDebug;\n\n/** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */\nexport const isMinimal =\n Boolean(process.env.MINIMAL) || isCI() || isTest || !hasTTY;\n\n/** Detect if process.platform is Windows */\nexport const isWindows = /^win/i.test(platform);\n\n/** Detect if process.platform is Linux */\nexport const isLinux = /^linux/i.test(platform);\n\n/** Detect if process.platform is macOS (darwin kernel) */\nexport const isMacOS = /^darwin/i.test(platform);\n\n/** Color Support */\nexport const isColorSupported =\n !process.env.NO_COLOR &&\n (Boolean(process.env.FORCE_COLOR) ||\n ((hasTTY || isWindows) && process.env.TERM !== \"dumb\") ||\n isCI());\n\nfunction parseVersion(versionString = \"\") {\n if (/^\\d{3,4}$/.test(versionString)) {\n const match = /(\\d{1,2})(\\d{2})/.exec(versionString) ?? [];\n\n return {\n major: 0,\n minor: Number.parseInt(match[1]!, 10),\n patch: Number.parseInt(match[2]!, 10)\n };\n }\n\n const versions = (versionString ?? \"\")\n .split(\".\")\n .map(n => Number.parseInt(n, 10));\n\n return {\n major: versions[0],\n minor: versions[1],\n patch: versions[2]\n };\n}\n\n/**\n * Check if the current environment supports hyperlinks in the terminal.\n *\n * @param stream - The stream to check for TTY support (default: process.stdout)\n * @returns Whether hyperlinks are supported\n */\nexport function isHyperlinkSupported(\n stream: NodeJS.WriteStream = process.stdout\n): boolean {\n if (process.env.FORCE_HYPERLINK) {\n return !(\n process.env.FORCE_HYPERLINK.length > 0 &&\n Number.parseInt(process.env.FORCE_HYPERLINK, 10) === 0\n );\n }\n\n // Netlify does not run a TTY, it does not need `supportsColor` check\n if (process.env.NETLIFY) {\n return true;\n } else if (!isColorSupported) {\n return false;\n } else if (stream && !stream.isTTY) {\n return false;\n } else if (\"WT_SESSION\" in process.env) {\n return true;\n } else if (process.platform === \"win32\") {\n return false;\n } else if (isCI()) {\n return false;\n } else if (process.env.TEAMCITY_VERSION) {\n return false;\n } else if (process.env.TERM_PROGRAM) {\n const version = parseVersion(process.env.TERM_PROGRAM_VERSION);\n\n switch (process.env.TERM_PROGRAM) {\n case \"iTerm.app\": {\n if (version.major === 3) {\n return version.minor !== undefined && version.minor >= 1;\n }\n\n return version.major !== undefined && version.major > 3;\n }\n case \"WezTerm\": {\n return version.major !== undefined && version.major >= 20_200_620;\n }\n case \"vscode\": {\n // Cursor forked VS Code and supports hyperlinks in 0.x.x\n if (process.env.CURSOR_TRACE_ID) {\n return true;\n }\n\n return (\n version.minor !== undefined &&\n version.major !== undefined &&\n (version.major > 1 || (version.major === 1 && version.minor >= 72))\n );\n }\n case \"ghostty\": {\n return true;\n }\n }\n }\n\n if (process.env.VTE_VERSION) {\n // 0.50.0 was supposed to support hyperlinks, but throws a segfault\n if (process.env.VTE_VERSION === \"0.50.0\") {\n return false;\n }\n\n const version = parseVersion(process.env.VTE_VERSION);\n\n return (\n (version.major !== undefined && version.major > 0) ||\n (version.minor !== undefined && version.minor >= 50)\n );\n }\n\n if (process.env.TERM === \"alacritty\") {\n return true;\n }\n\n return false;\n}\n\n/** Node.js versions */\nexport const nodeVersion =\n (process?.versions?.node || \"\").replace(/^v/, \"\") || null;\n\nexport const nodeMajorVersion = Number(nodeVersion?.split(\".\")[0]) || null;\n"],"mappings":"uCAqBA,MAAa,EAAW,SAAS,UAAY,GAGhC,EAAS,GAAQ,SAAS,QAAU,SAAS,OAAO,OAGpD,EAAU,EAAQ,QAAQ,IAAI,MAGrC,EACJ,QAAQ,IAAI,YACZ,QAAQ,IAAI,wBACZ,QAAQ,IAAI,UACZ,aAGW,EAAY,CAAC,MAAO,QAAS,UAAU,CAAC,SACnD,GAAM,aAAa,CACpB,CAQD,SAAgB,EAAiB,EAAc,CAC7C,MAAO,CACL,MACA,OACA,aAEA,UAEA,gBACA,MACD,CAAC,SAASA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAAC,CAI9B,EAAiB,EAAK,CAQlD,SAAgB,EAAW,EAAc,CACvC,MAAO,CACL,MACA,OACA,UACA,MACA,QACA,UACA,KAEA,mBACD,CAAC,SAASA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAAC,CAKxD,EAAW,EAAK,EAAI,GAAqB,QAAQ,IAAI,KAQvD,SAAgB,EAAkB,EAAc,CAC9C,MAAO,CAAC,MAAO,cAAe,MAAO,cAAc,CAAC,SAClDA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAC7C,CAIH,MAAa,EAAgB,EAAkB,EAAK,EAAI,EAI9C,QAAQ,IAAI,SAAY,GAAM,CAGxC,MAAa,EAAY,QAAQ,KAAK,EAAS,CAGxB,UAAU,KAAK,EAAS,CAGxB,WAAW,KAAK,EAAS,CAI9C,CAAC,QAAQ,IAAI,WACJ,QAAQ,IAAI,cACjB,GAAU,IAAc,QAAQ,IAAI,OAAS,QAC/C,GAAM,EA6GV,MAAa,GACV,SAAS,UAAU,MAAQ,IAAI,QAAQ,KAAM,GAAG,EAAI,KAEvB,OAAO,GAAa,MAAM,IAAI,CAAC,GAAG"}
1
+ {"version":3,"file":"environment-checks.mjs","names":["mode"],"sources":["../../../../env/src/environment-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isCI } from \"./ci-checks\";\n\n/** Value of process.platform */\nexport const platform = process?.platform || \"\";\n\n/** Detect if stdout.TTY is available */\nexport const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);\n\n/** Detect if `DEBUG` environment variable is set */\nexport const isDebug = Boolean(process.env.DEBUG);\n\n/** Detect the `NODE_ENV` environment variable */\nconst mode =\n process.env.STORM_MODE ||\n process.env.NEXT_PUBLIC_VERCEL_ENV ||\n process.env.NODE_ENV ||\n \"production\";\n\n/** Detect if the application is running in a staging environment */\nexport const isStaging = [\"stg\", \"stage\", \"staging\"].includes(\n mode?.toLowerCase()\n);\n\n/**\n * Check if the current environment is production.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is production\n */\nexport function isProductionMode(mode: string) {\n return [\n \"prd\",\n \"prod\",\n \"production\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preprod\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preproduction\",\n \"uat\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `production` */\nexport const isProduction = isProductionMode(mode);\n\n/**\n * Check if the current environment is test.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is test\n */\nexport function isTestMode(mode: string) {\n return [\n \"tst\",\n \"test\",\n \"testing\",\n \"stg\",\n \"stage\",\n \"staging\",\n \"qa\",\n // eslint-disable-next-line @cspell/spellchecker\n \"qualityassurance\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `test` */\nexport const isTest =\n isTestMode(mode) || isStaging || Boolean(process.env.TEST);\n\n/**\n * Check if the current environment is development.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is development\n */\nexport function isDevelopmentMode(mode: string) {\n return [\"dev\", \"development\", \"int\", \"integration\"].includes(\n mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\")\n );\n}\n\n/** Detect if `NODE_ENV` environment variable is `dev` or `development` */\nexport const isDevelopment = isDevelopmentMode(mode) || isDebug;\n\n/** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */\nexport const isMinimal =\n Boolean(process.env.MINIMAL) || isCI() || isTest || !hasTTY;\n\n/** Detect if process.platform is Windows */\nexport const isWindows = /^win/i.test(platform);\n\n/** Detect if process.platform is Linux */\nexport const isLinux = /^linux/i.test(platform);\n\n/** Detect if process.platform is macOS (darwin kernel) */\nexport const isMacOS = /^darwin/i.test(platform);\n\n/** Color Support */\nexport const isColorSupported =\n !process.env.NO_COLOR &&\n (Boolean(process.env.FORCE_COLOR) ||\n ((hasTTY || isWindows) && process.env.TERM !== \"dumb\") ||\n isCI());\n\nfunction parseVersion(versionString = \"\") {\n if (/^\\d{3,4}$/.test(versionString)) {\n const match = /(\\d{1,2})(\\d{2})/.exec(versionString) ?? [];\n\n return {\n major: 0,\n minor: Number.parseInt(match[1]!, 10),\n patch: Number.parseInt(match[2]!, 10)\n };\n }\n\n const versions = (versionString ?? \"\")\n .split(\".\")\n .map(n => Number.parseInt(n, 10));\n\n return {\n major: versions[0],\n minor: versions[1],\n patch: versions[2]\n };\n}\n\n/**\n * Check if the current environment supports hyperlinks in the terminal.\n *\n * @param stream - The stream to check for TTY support (default: process.stdout)\n * @returns Whether hyperlinks are supported\n */\nexport function isHyperlinkSupported(\n stream: NodeJS.WriteStream = process.stdout\n): boolean {\n if (process.env.FORCE_HYPERLINK) {\n return !(\n process.env.FORCE_HYPERLINK.length > 0 &&\n Number.parseInt(process.env.FORCE_HYPERLINK, 10) === 0\n );\n }\n\n // Netlify does not run a TTY, it does not need `supportsColor` check\n if (process.env.NETLIFY) {\n return true;\n } else if (!isColorSupported) {\n return false;\n } else if (stream && !stream.isTTY) {\n return false;\n } else if (\"WT_SESSION\" in process.env) {\n return true;\n } else if (process.platform === \"win32\") {\n return false;\n } else if (isCI()) {\n return false;\n } else if (process.env.TEAMCITY_VERSION) {\n return false;\n } else if (process.env.TERM_PROGRAM) {\n const version = parseVersion(process.env.TERM_PROGRAM_VERSION);\n\n switch (process.env.TERM_PROGRAM) {\n case \"iTerm.app\": {\n if (version.major === 3) {\n return version.minor !== undefined && version.minor >= 1;\n }\n\n return version.major !== undefined && version.major > 3;\n }\n case \"WezTerm\": {\n return version.major !== undefined && version.major >= 20_200_620;\n }\n case \"vscode\": {\n // Cursor forked VS Code and supports hyperlinks in 0.x.x\n if (process.env.CURSOR_TRACE_ID) {\n return true;\n }\n\n return (\n version.minor !== undefined &&\n version.major !== undefined &&\n (version.major > 1 || (version.major === 1 && version.minor >= 72))\n );\n }\n case \"ghostty\": {\n return true;\n }\n }\n }\n\n if (process.env.VTE_VERSION) {\n // 0.50.0 was supposed to support hyperlinks, but throws a segfault\n if (process.env.VTE_VERSION === \"0.50.0\") {\n return false;\n }\n\n const version = parseVersion(process.env.VTE_VERSION);\n\n return (\n (version.major !== undefined && version.major > 0) ||\n (version.minor !== undefined && version.minor >= 50)\n );\n }\n\n if (process.env.TERM === \"alacritty\") {\n return true;\n }\n\n return false;\n}\n\n/** Node.js versions */\nexport const nodeVersion =\n (process?.versions?.node || \"\").replace(/^v/, \"\") || null;\n\nexport const nodeMajorVersion = Number(nodeVersion?.split(\".\")[0]) || null;\n"],"mappings":";;;;AAqBA,MAAa,WAAW,SAAS,YAAY;;AAG7C,MAAa,SAAS,QAAQ,SAAS,UAAU,SAAS,OAAO,MAAM;;AAGvE,MAAa,UAAU,QAAQ,QAAQ,IAAI,MAAM;;AAGjD,MAAM,OACJ,QAAQ,IAAI,cACZ,QAAQ,IAAI,0BACZ,QAAQ,IAAI,YACZ;;AAGF,MAAa,YAAY;CAAC;CAAO;CAAS;CAAU,CAAC,SACnD,MAAM,aAAa,CACpB;;;;;;;AAQD,SAAgB,iBAAiB,QAAc;AAC7C,QAAO;EACL;EACA;EACA;EAEA;EAEA;EACA;EACD,CAAC,SAASA,QAAM,aAAa,EAAE,QAAQ,YAAY,GAAG,CAAC;;;AAI1D,MAAa,eAAe,iBAAiB,KAAK;;;;;;;AAQlD,SAAgB,WAAW,QAAc;AACvC,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACD,CAAC,SAASA,QAAM,aAAa,EAAE,QAAQ,YAAY,GAAG,CAAC;;;AAI1D,MAAa,SACX,WAAW,KAAK,IAAI,aAAa,QAAQ,QAAQ,IAAI,KAAK;;;;;;;AAQ5D,SAAgB,kBAAkB,QAAc;AAC9C,QAAO;EAAC;EAAO;EAAe;EAAO;EAAc,CAAC,SAClDA,QAAM,aAAa,EAAE,QAAQ,YAAY,GAAG,CAC7C;;;AAIH,MAAa,gBAAgB,kBAAkB,KAAK,IAAI;;AAGxD,MAAa,YACX,QAAQ,QAAQ,IAAI,QAAQ,IAAI,MAAM,IAAI,UAAU,CAAC;;AAGvD,MAAa,YAAY,QAAQ,KAAK,SAAS;;AAG/C,MAAa,UAAU,UAAU,KAAK,SAAS;;AAG/C,MAAa,UAAU,WAAW,KAAK,SAAS;;AAGhD,MAAa,mBACX,CAAC,QAAQ,IAAI,aACZ,QAAQ,QAAQ,IAAI,YAAY,KAC7B,UAAU,cAAc,QAAQ,IAAI,SAAS,UAC/C,MAAM;;AA6GV,MAAa,eACV,SAAS,UAAU,QAAQ,IAAI,QAAQ,MAAM,GAAG,IAAI;AAEvD,MAAa,mBAAmB,OAAO,aAAa,MAAM,IAAI,CAAC,GAAG,IAAI"}
package/dist/index.cjs CHANGED
@@ -1 +1,30 @@
1
- const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./action-handler.cjs`),n=require(`./shared.cjs`),r=require(`./client.cjs`),i=require(`./server.cjs`),a=require(`./tanstack-query/client.cjs`),o=require(`./tanstack-query/server.cjs`);let s=require(`@trpc/server/adapters/next-app-dir`);exports.createQueryClient=n.createQueryClient,exports.createTRPCClient=r.createTRPCClient,exports.createTRPCServer=i.createTRPCServer,exports.createTRPCServerActionHandler=t.createTRPCServerActionHandler,exports.createTRPCTanstackQueryClient=a.createTRPCTanstackQueryClient,exports.createTRPCTanstackQueryServer=o.createTRPCTanstackQueryServer,exports.createUseAction=r.createUseAction,exports.getTRPCServerUrl=n.getTRPCServerUrl,Object.defineProperty(exports,`notFound`,{enumerable:!0,get:function(){return s.experimental_notFound}}),Object.defineProperty(exports,`redirect`,{enumerable:!0,get:function(){return s.experimental_redirect}}),exports.transformer=n.transformer;
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_action_handler = require('./action-handler.cjs');
3
+ const require_shared = require('./shared.cjs');
4
+ const require_client = require('./client.cjs');
5
+ const require_server = require('./server.cjs');
6
+ const require_tanstack_query_client = require('./tanstack-query/client.cjs');
7
+ const require_tanstack_query_server = require('./tanstack-query/server.cjs');
8
+ let __trpc_server_adapters_next_app_dir = require("@trpc/server/adapters/next-app-dir");
9
+
10
+ exports.createQueryClient = require_shared.createQueryClient;
11
+ exports.createTRPCClient = require_client.createTRPCClient;
12
+ exports.createTRPCServer = require_server.createTRPCServer;
13
+ exports.createTRPCServerActionHandler = require_action_handler.createTRPCServerActionHandler;
14
+ exports.createTRPCTanstackQueryClient = require_tanstack_query_client.createTRPCTanstackQueryClient;
15
+ exports.createTRPCTanstackQueryServer = require_tanstack_query_server.createTRPCTanstackQueryServer;
16
+ exports.createUseAction = require_client.createUseAction;
17
+ exports.getTRPCServerUrl = require_shared.getTRPCServerUrl;
18
+ Object.defineProperty(exports, 'notFound', {
19
+ enumerable: true,
20
+ get: function () {
21
+ return __trpc_server_adapters_next_app_dir.experimental_notFound;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, 'redirect', {
25
+ enumerable: true,
26
+ get: function () {
27
+ return __trpc_server_adapters_next_app_dir.experimental_redirect;
28
+ }
29
+ });
30
+ exports.transformer = require_shared.transformer;
package/dist/index.mjs CHANGED
@@ -1 +1,8 @@
1
- import{createTRPCServerActionHandler as e}from"./action-handler.mjs";import{createQueryClient as t,getTRPCServerUrl as n,transformer as r}from"./shared.mjs";import{createTRPCClient as i,createUseAction as a}from"./client.mjs";import{createTRPCServer as o,notFound as s,redirect as c}from"./server.mjs";import{createTRPCTanstackQueryClient as l}from"./tanstack-query/client.mjs";import{createTRPCTanstackQueryServer as u}from"./tanstack-query/server.mjs";export{t as createQueryClient,i as createTRPCClient,o as createTRPCServer,e as createTRPCServerActionHandler,l as createTRPCTanstackQueryClient,u as createTRPCTanstackQueryServer,a as createUseAction,n as getTRPCServerUrl,s as notFound,c as redirect,r as transformer};
1
+ import { createTRPCServerActionHandler } from "./action-handler.mjs";
2
+ import { createQueryClient, getTRPCServerUrl, transformer } from "./shared.mjs";
3
+ import { createTRPCClient, createUseAction } from "./client.mjs";
4
+ import { createTRPCServer, notFound, redirect } from "./server.mjs";
5
+ import { createTRPCTanstackQueryClient } from "./tanstack-query/client.mjs";
6
+ import { createTRPCTanstackQueryServer } from "./tanstack-query/server.mjs";
7
+
8
+ export { createQueryClient, createTRPCClient, createTRPCServer, createTRPCServerActionHandler, createTRPCTanstackQueryClient, createTRPCTanstackQueryServer, createUseAction, getTRPCServerUrl, notFound, redirect, transformer };
@@ -1 +1,28 @@
1
- const e=require(`./regex.cjs`),t=require(`./slash.cjs`);function n(n){return e.ABSOLUTE_PATH_REGEX.test(t.slash(n))}function r(e){return n(e)}exports.isAbsolute=r;
1
+ const require_regex = require('./regex.cjs');
2
+ const require_slash = require('./slash.cjs');
3
+
4
+ //#region ../path/src/is-type.ts
5
+ /**
6
+ * Check if the path is an absolute path.
7
+ *
8
+ * @param path - The path to check
9
+ * @returns An indicator specifying if the path is an absolute path
10
+ */
11
+ function isAbsolutePath(path) {
12
+ return require_regex.ABSOLUTE_PATH_REGEX.test(require_slash.slash(path));
13
+ }
14
+ /**
15
+ * Check if the path is an absolute path.
16
+ *
17
+ * @remarks
18
+ * This is an alias for {@link isAbsolutePath}.
19
+ *
20
+ * @param path - The path to check
21
+ * @returns An indicator specifying if the path is an absolute path
22
+ */
23
+ function isAbsolute(path) {
24
+ return isAbsolutePath(path);
25
+ }
26
+
27
+ //#endregion
28
+ exports.isAbsolute = isAbsolute;
@@ -1,2 +1,29 @@
1
- import{ABSOLUTE_PATH_REGEX as e}from"./regex.mjs";import{slash as t}from"./slash.mjs";function n(n){return e.test(t(n))}function r(e){return n(e)}export{r as isAbsolute};
1
+ import { ABSOLUTE_PATH_REGEX } from "./regex.mjs";
2
+ import { slash } from "./slash.mjs";
3
+
4
+ //#region ../path/src/is-type.ts
5
+ /**
6
+ * Check if the path is an absolute path.
7
+ *
8
+ * @param path - The path to check
9
+ * @returns An indicator specifying if the path is an absolute path
10
+ */
11
+ function isAbsolutePath(path) {
12
+ return ABSOLUTE_PATH_REGEX.test(slash(path));
13
+ }
14
+ /**
15
+ * Check if the path is an absolute path.
16
+ *
17
+ * @remarks
18
+ * This is an alias for {@link isAbsolutePath}.
19
+ *
20
+ * @param path - The path to check
21
+ * @returns An indicator specifying if the path is an absolute path
22
+ */
23
+ function isAbsolute(path) {
24
+ return isAbsolutePath(path);
25
+ }
26
+
27
+ //#endregion
28
+ export { isAbsolute };
2
29
  //# sourceMappingURL=is-type.mjs.map