File tree Expand file tree Collapse file tree 6 files changed +27
-13
lines changed Expand file tree Collapse file tree 6 files changed +27
-13
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/sdk" ,
3- "version" : " 2.0.12 " ,
3+ "version" : " 2.0.13 " ,
44 "private" : false ,
55 "repository" : " github:PipedreamHQ/pipedream-sdk-typescript" ,
66 "type" : " commonjs" ,
9393 "webpack" : " ^5.97.1"
9494 },
9595 "browser" : {
96+ "./dist/cjs/wrapper/utils/getBaseUrl.js" : " ./dist/cjs/wrapper/utils/getBaseUrl.browser.js" ,
97+ "./dist/esm/wrapper/utils/getBaseUrl.mjs" : " ./dist/esm/wrapper/utils/getBaseUrl.browser.mjs" ,
9698 "fs" : false ,
9799 "os" : false ,
98100 "path" : false ,
Original file line number Diff line number Diff line change 1- export const SDK_VERSION = "2.0.12 " ;
1+ export const SDK_VERSION = "2.0.13 " ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { ProjectEnvironment } from "../api/index.js";
33import { Workflows } from "../api/resources/workflows/client/Client.js" ;
44import { PipedreamClient } from "../Client.js" ;
55import { PipedreamEnvironment } from "../environments.js" ;
6+ import { getBaseUrl } from "./utils/getBaseUrl.js" ;
67
78export type PipedreamClientOpts = {
89 /**
@@ -43,17 +44,6 @@ export type PipedreamClientOpts = {
4344 workflowDomain ?: string ;
4445} ;
4546
46- /**
47- * Returns the base URL for the Pipedream API based on the provided environment.
48- * It replaces any placeholders in the environment string with corresponding
49- * environment variables.
50- *
51- * @param environment - The Pipedream environment string.
52- * @returns The base URL for the Pipedream API.
53- */
54- const getBaseUrl = ( environment : PipedreamEnvironment ) =>
55- environment . replace ( / \$ \{ ( \w + ) \} / g, ( _ , name ) => process . env [ name ] ?? "" ) ;
56-
5747export class Pipedream extends PipedreamClient {
5848 private _workflowDomain ?: string ;
5949 private _workflows : Workflows | undefined ;
Original file line number Diff line number Diff line change 1+ import { PipedreamEnvironment } from "../../environments.js" ;
2+
3+ /**
4+ * Returns the base URL for the Pipedream API based on the provided environment.
5+ * Browser-optimized version that returns the production environment directly.
6+ *
7+ * @returns The base URL for the Pipedream API.
8+ */
9+ export const getBaseUrl = ( ) => PipedreamEnvironment . Prod ;
Original file line number Diff line number Diff line change 1+ import { PipedreamEnvironment } from "../../environments.js" ;
2+
3+ /**
4+ * Returns the base URL for the Pipedream API based on the provided environment.
5+ * It replaces any placeholders in the environment string with corresponding
6+ * environment variables.
7+ *
8+ * @param environment - The Pipedream environment string.
9+ * @returns The base URL for the Pipedream API.
10+ */
11+ export const getBaseUrl = ( environment : PipedreamEnvironment ) =>
12+ environment . replace ( / \$ \{ ( \w + ) \} / g, ( _ , name ) => process . env [ name ] ?? "" ) ;
Original file line number Diff line number Diff line change 1+ export { getBaseUrl } from "./getBaseUrl.js" ;
You can’t perform that action at this time.
0 commit comments