sharetribe-flex-build-sdk 1.16.8 → 1.16.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api/client.d.ts +5 -5
- package/dist/api/client.js +7 -7
- package/dist/api/client.js.map +1 -1
- package/dist/auth-storage.d.ts +40 -4
- package/dist/auth-storage.d.ts.map +1 -1
- package/dist/auth-storage.js +70 -14
- package/dist/auth-storage.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/processes.d.ts +1 -1
- package/dist/processes.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -209,12 +209,12 @@ The SDK provides programmatic access to CLI capabilities:
|
|
|
209
209
|
|
|
210
210
|
## Related Packages
|
|
211
211
|
|
|
212
|
-
- [sharetribe-cli](https://www.npmjs.com/package/sharetribe-cli) - Command-line interface that depends on this SDK
|
|
212
|
+
- [sharetribe-community-cli](https://www.npmjs.com/package/sharetribe-community-cli) - Command-line interface that depends on this SDK
|
|
213
213
|
|
|
214
214
|
## Version Relationship
|
|
215
215
|
|
|
216
216
|
- The CLI and SDK versions are kept in sync (1-to-1 relationship)
|
|
217
|
-
- Both packages are maintained in the same [monorepo](https://github.com/
|
|
217
|
+
- Both packages are maintained in the same [monorepo](https://github.com/sharetribe-community/sharetribe-cli)
|
|
218
218
|
|
|
219
219
|
## License
|
|
220
220
|
|
package/dist/api/client.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface ApiError {
|
|
|
13
13
|
/**
|
|
14
14
|
* Makes a GET request to the API
|
|
15
15
|
*
|
|
16
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
16
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
17
17
|
* @param endpoint - API endpoint path
|
|
18
18
|
* @param queryParams - Optional query parameters
|
|
19
19
|
* @returns API response
|
|
@@ -22,7 +22,7 @@ export declare function apiGet<T>(apiKey: string | undefined, endpoint: string,
|
|
|
22
22
|
/**
|
|
23
23
|
* Makes a POST request to the API
|
|
24
24
|
*
|
|
25
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
25
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
26
26
|
* @param endpoint - API endpoint path
|
|
27
27
|
* @param queryParams - Optional query parameters
|
|
28
28
|
* @param body - Request body
|
|
@@ -32,7 +32,7 @@ export declare function apiPost<T>(apiKey: string | undefined, endpoint: string,
|
|
|
32
32
|
/**
|
|
33
33
|
* Makes a DELETE request to the API
|
|
34
34
|
*
|
|
35
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
35
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
36
36
|
* @param endpoint - API endpoint path
|
|
37
37
|
* @param queryParams - Optional query parameters
|
|
38
38
|
* @returns API response
|
|
@@ -41,7 +41,7 @@ export declare function apiDelete<T>(apiKey: string | undefined, endpoint: strin
|
|
|
41
41
|
/**
|
|
42
42
|
* Makes a multipart form-data POST request to the API
|
|
43
43
|
*
|
|
44
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
44
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
45
45
|
* @param endpoint - API endpoint path
|
|
46
46
|
* @param queryParams - Query parameters
|
|
47
47
|
* @param fields - Multipart form fields
|
|
@@ -52,7 +52,7 @@ export declare function apiPostMultipart<T>(apiKey: string | undefined, endpoint
|
|
|
52
52
|
* Makes a POST request to the API with Transit-encoded body
|
|
53
53
|
* Transit is a data format used by the Sharetribe API for certain endpoints
|
|
54
54
|
*
|
|
55
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
55
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
56
56
|
* @param endpoint - API endpoint path
|
|
57
57
|
* @param queryParams - Query parameters
|
|
58
58
|
* @param body - Request body (will be Transit-encoded)
|
package/dist/api/client.js
CHANGED
|
@@ -11,7 +11,7 @@ import { getApiBaseUrl } from '../config.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Gets authentication headers from provided API key or auth file
|
|
13
13
|
*
|
|
14
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
14
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
15
15
|
* @returns Authorization headers
|
|
16
16
|
*/
|
|
17
17
|
function getAuthHeaders(apiKey) {
|
|
@@ -19,7 +19,7 @@ function getAuthHeaders(apiKey) {
|
|
|
19
19
|
if (!key) {
|
|
20
20
|
const auth = readAuth();
|
|
21
21
|
if (!auth) {
|
|
22
|
-
throw new Error('Not logged in. Please provide apiKey or run: sharetribe-cli login');
|
|
22
|
+
throw new Error('Not logged in. Please provide apiKey or run: sharetribe-community-cli login');
|
|
23
23
|
}
|
|
24
24
|
key = auth.apiKey;
|
|
25
25
|
}
|
|
@@ -56,7 +56,7 @@ function handleResponse(response) {
|
|
|
56
56
|
/**
|
|
57
57
|
* Makes a GET request to the API
|
|
58
58
|
*
|
|
59
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
59
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
60
60
|
* @param endpoint - API endpoint path
|
|
61
61
|
* @param queryParams - Optional query parameters
|
|
62
62
|
* @returns API response
|
|
@@ -74,7 +74,7 @@ export async function apiGet(apiKey, endpoint, queryParams) {
|
|
|
74
74
|
/**
|
|
75
75
|
* Makes a POST request to the API
|
|
76
76
|
*
|
|
77
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
77
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
78
78
|
* @param endpoint - API endpoint path
|
|
79
79
|
* @param queryParams - Optional query parameters
|
|
80
80
|
* @param body - Request body
|
|
@@ -93,7 +93,7 @@ export async function apiPost(apiKey, endpoint, queryParams, body) {
|
|
|
93
93
|
/**
|
|
94
94
|
* Makes a DELETE request to the API
|
|
95
95
|
*
|
|
96
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
96
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
97
97
|
* @param endpoint - API endpoint path
|
|
98
98
|
* @param queryParams - Optional query parameters
|
|
99
99
|
* @returns API response
|
|
@@ -111,7 +111,7 @@ export async function apiDelete(apiKey, endpoint, queryParams) {
|
|
|
111
111
|
/**
|
|
112
112
|
* Makes a multipart form-data POST request to the API
|
|
113
113
|
*
|
|
114
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
114
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
115
115
|
* @param endpoint - API endpoint path
|
|
116
116
|
* @param queryParams - Query parameters
|
|
117
117
|
* @param fields - Multipart form fields
|
|
@@ -139,7 +139,7 @@ export async function apiPostMultipart(apiKey, endpoint, queryParams, fields) {
|
|
|
139
139
|
* Makes a POST request to the API with Transit-encoded body
|
|
140
140
|
* Transit is a data format used by the Sharetribe API for certain endpoints
|
|
141
141
|
*
|
|
142
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
142
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
143
143
|
* @param endpoint - API endpoint path
|
|
144
144
|
* @param queryParams - Query parameters
|
|
145
145
|
* @param body - Request body (will be Transit-encoded)
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAkB,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7C;;;;;GAKG;AACH,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,GAAG,GAAG,MAAM,CAAC;IAEjB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAkB,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7C;;;;;GAKG;AACH,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,GAAG,GAAG,MAAM,CAAC;IAEjB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI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AG,IAAI,GAAG,CAAC,aAAa,EAAE,GAAG,QAAQ,CAAC,CAAC;IAChD,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACnD,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAExF,yBAAyB;IACzB,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAQ,CAAC;QACtD,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,KAAK,GAAa;YACtB,IAAI,EAAE,UAAU,EAAE,IAAI,IAAI,eAAe;YACzC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,QAAQ,QAAQ,CAAC,UAAU,EAAE;YAC3D,MAAM,EAAE,QAAQ,CAAC,UAAU;SAC5B,CAAC;QACF,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAM,CAAC;AAC3C,CAAC"}
|
package/dist/auth-storage.d.ts
CHANGED
|
@@ -1,19 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Authentication storage - manages
|
|
2
|
+
* Authentication storage - manages flex-cli's auth.edn
|
|
3
3
|
*
|
|
4
|
-
* Must maintain 100% compatibility with flex-cli's auth.edn format
|
|
4
|
+
* Must maintain 100% compatibility with flex-cli's auth.edn format *and* with
|
|
5
|
+
* the location flex-cli keeps it in. The location is not always
|
|
6
|
+
* `~/.config/flex-cli`: flex-cli follows the XDG spec, so `XDG_CONFIG_HOME`
|
|
7
|
+
* wins where it is set, and on Windows `%LOCALAPPDATA%` is used instead of
|
|
8
|
+
* `~/.config`. Hardcoding `~/.config` meant this SDK looked in the wrong place
|
|
9
|
+
* on Windows and on any machine with `XDG_CONFIG_HOME` set, so a user who had
|
|
10
|
+
* logged in with flex-cli appeared logged out.
|
|
11
|
+
*
|
|
12
|
+
* `resolveConfigDir` reproduces flex-cli's own resolution order, taken from its
|
|
13
|
+
* `sharetribe.flex-cli.xdg` namespace.
|
|
14
|
+
*/
|
|
15
|
+
/** The subset of `process.env` that takes part in resolving the config dir. */
|
|
16
|
+
export interface ConfigDirEnv {
|
|
17
|
+
readonly HOME?: string;
|
|
18
|
+
readonly XDG_CONFIG_HOME?: string;
|
|
19
|
+
readonly LOCALAPPDATA?: string;
|
|
20
|
+
readonly HOMEDRIVE?: string;
|
|
21
|
+
readonly HOMEPATH?: string;
|
|
22
|
+
readonly USERPROFILE?: string;
|
|
23
|
+
/** Present so `process.env` itself is accepted. */
|
|
24
|
+
readonly [key: string]: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The config directory for a given platform and environment, exported so the
|
|
28
|
+
* Windows and XDG branches can be exercised from any machine.
|
|
29
|
+
*
|
|
30
|
+
* Order, matching flex-cli exactly: `XDG_CONFIG_HOME`, then `%LOCALAPPDATA%`
|
|
31
|
+
* on Windows only, then `<home>/.config`. A single directory, not a search
|
|
32
|
+
* path: flex-cli reads and writes one location, and so must this.
|
|
33
|
+
*/
|
|
34
|
+
export declare function configDirFor(platform: NodeJS.Platform, env: ConfigDirEnv, osHome: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* The config directory on this machine, resolved at call time so a change to
|
|
37
|
+
* the environment is honoured rather than frozen at import.
|
|
5
38
|
*/
|
|
39
|
+
export declare function resolveConfigDir(): string;
|
|
40
|
+
/** Full path to the `auth.edn` this SDK reads and writes. */
|
|
41
|
+
export declare function getAuthFilePath(): string;
|
|
6
42
|
export interface AuthData {
|
|
7
43
|
apiKey: string;
|
|
8
44
|
}
|
|
9
45
|
/**
|
|
10
|
-
* Reads authentication data from
|
|
46
|
+
* Reads authentication data from flex-cli's auth.edn
|
|
11
47
|
*
|
|
12
48
|
* Returns null if file doesn't exist or is invalid
|
|
13
49
|
*/
|
|
14
50
|
export declare function readAuth(): AuthData | null;
|
|
15
51
|
/**
|
|
16
|
-
* Writes authentication data to
|
|
52
|
+
* Writes authentication data to flex-cli's auth.edn
|
|
17
53
|
*
|
|
18
54
|
* Format must match flex-cli exactly: {:api-key "..."}
|
|
19
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-storage.d.ts","sourceRoot":"","sources":["../src/auth-storage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"auth-storage.d.ts","sourceRoot":"","sources":["../src/auth-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC5C;AA4BD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAOR;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAsB1C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAa9C;AAED;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAU/C"}
|
package/dist/auth-storage.js
CHANGED
|
@@ -1,25 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Authentication storage - manages
|
|
2
|
+
* Authentication storage - manages flex-cli's auth.edn
|
|
3
3
|
*
|
|
4
|
-
* Must maintain 100% compatibility with flex-cli's auth.edn format
|
|
4
|
+
* Must maintain 100% compatibility with flex-cli's auth.edn format *and* with
|
|
5
|
+
* the location flex-cli keeps it in. The location is not always
|
|
6
|
+
* `~/.config/flex-cli`: flex-cli follows the XDG spec, so `XDG_CONFIG_HOME`
|
|
7
|
+
* wins where it is set, and on Windows `%LOCALAPPDATA%` is used instead of
|
|
8
|
+
* `~/.config`. Hardcoding `~/.config` meant this SDK looked in the wrong place
|
|
9
|
+
* on Windows and on any machine with `XDG_CONFIG_HOME` set, so a user who had
|
|
10
|
+
* logged in with flex-cli appeared logged out.
|
|
11
|
+
*
|
|
12
|
+
* `resolveConfigDir` reproduces flex-cli's own resolution order, taken from its
|
|
13
|
+
* `sharetribe.flex-cli.xdg` namespace.
|
|
5
14
|
*/
|
|
6
15
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
7
|
-
import { homedir } from 'node:os';
|
|
16
|
+
import { homedir, tmpdir } from 'node:os';
|
|
8
17
|
import { join } from 'node:path';
|
|
9
18
|
import edn from 'jsedn';
|
|
10
|
-
const
|
|
11
|
-
const
|
|
19
|
+
const CONFIG_DIR_NAME = 'flex-cli';
|
|
20
|
+
const AUTH_FILE_NAME = 'auth.edn';
|
|
21
|
+
/**
|
|
22
|
+
* flex-cli's notion of the home directory. Windows has no `HOME`, so it falls
|
|
23
|
+
* back to `HOMEDRIVE` + `HOMEPATH` and then `USERPROFILE` before reaching for
|
|
24
|
+
* the OS defaults.
|
|
25
|
+
*/
|
|
26
|
+
function resolveHome(platform, env, osHome) {
|
|
27
|
+
if (env.HOME) {
|
|
28
|
+
return env.HOME;
|
|
29
|
+
}
|
|
30
|
+
if (platform === 'win32') {
|
|
31
|
+
if (env.HOMEDRIVE && env.HOMEPATH) {
|
|
32
|
+
return join(env.HOMEDRIVE, env.HOMEPATH);
|
|
33
|
+
}
|
|
34
|
+
if (env.USERPROFILE) {
|
|
35
|
+
return env.USERPROFILE;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return osHome || tmpdir();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The config directory for a given platform and environment, exported so the
|
|
42
|
+
* Windows and XDG branches can be exercised from any machine.
|
|
43
|
+
*
|
|
44
|
+
* Order, matching flex-cli exactly: `XDG_CONFIG_HOME`, then `%LOCALAPPDATA%`
|
|
45
|
+
* on Windows only, then `<home>/.config`. A single directory, not a search
|
|
46
|
+
* path: flex-cli reads and writes one location, and so must this.
|
|
47
|
+
*/
|
|
48
|
+
export function configDirFor(platform, env, osHome) {
|
|
49
|
+
const base = env.XDG_CONFIG_HOME ||
|
|
50
|
+
(platform === 'win32' ? env.LOCALAPPDATA : undefined) ||
|
|
51
|
+
join(resolveHome(platform, env, osHome), '.config');
|
|
52
|
+
return join(base, CONFIG_DIR_NAME);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The config directory on this machine, resolved at call time so a change to
|
|
56
|
+
* the environment is honoured rather than frozen at import.
|
|
57
|
+
*/
|
|
58
|
+
export function resolveConfigDir() {
|
|
59
|
+
return configDirFor(process.platform, process.env, homedir());
|
|
60
|
+
}
|
|
61
|
+
/** Full path to the `auth.edn` this SDK reads and writes. */
|
|
62
|
+
export function getAuthFilePath() {
|
|
63
|
+
return join(resolveConfigDir(), AUTH_FILE_NAME);
|
|
64
|
+
}
|
|
12
65
|
/**
|
|
13
|
-
* Reads authentication data from
|
|
66
|
+
* Reads authentication data from flex-cli's auth.edn
|
|
14
67
|
*
|
|
15
68
|
* Returns null if file doesn't exist or is invalid
|
|
16
69
|
*/
|
|
17
70
|
export function readAuth() {
|
|
18
71
|
try {
|
|
19
|
-
|
|
72
|
+
const authFile = getAuthFilePath();
|
|
73
|
+
if (!existsSync(authFile)) {
|
|
20
74
|
return null;
|
|
21
75
|
}
|
|
22
|
-
const content = readFileSync(
|
|
76
|
+
const content = readFileSync(authFile, 'utf-8');
|
|
23
77
|
const parsed = edn.parse(content);
|
|
24
78
|
// EDN keys are symbols, get :api-key
|
|
25
79
|
const apiKeySymbol = edn.kw(':api-key');
|
|
@@ -34,28 +88,30 @@ export function readAuth() {
|
|
|
34
88
|
}
|
|
35
89
|
}
|
|
36
90
|
/**
|
|
37
|
-
* Writes authentication data to
|
|
91
|
+
* Writes authentication data to flex-cli's auth.edn
|
|
38
92
|
*
|
|
39
93
|
* Format must match flex-cli exactly: {:api-key "..."}
|
|
40
94
|
*/
|
|
41
95
|
export function writeAuth(data) {
|
|
96
|
+
const configDir = resolveConfigDir();
|
|
42
97
|
// Ensure config directory exists
|
|
43
|
-
if (!existsSync(
|
|
44
|
-
mkdirSync(
|
|
98
|
+
if (!existsSync(configDir)) {
|
|
99
|
+
mkdirSync(configDir, { recursive: true });
|
|
45
100
|
}
|
|
46
101
|
// Create EDN map with :api-key
|
|
47
102
|
const authMap = new edn.Map([edn.kw(':api-key'), data.apiKey]);
|
|
48
103
|
const ednString = edn.encode(authMap);
|
|
49
|
-
writeFileSync(
|
|
104
|
+
writeFileSync(join(configDir, AUTH_FILE_NAME), ednString, 'utf-8');
|
|
50
105
|
}
|
|
51
106
|
/**
|
|
52
107
|
* Clears authentication data (deletes auth.edn file)
|
|
53
108
|
*/
|
|
54
109
|
export async function clearAuth() {
|
|
55
110
|
try {
|
|
56
|
-
|
|
111
|
+
const authFile = getAuthFilePath();
|
|
112
|
+
if (existsSync(authFile)) {
|
|
57
113
|
const fs = await import('node:fs/promises');
|
|
58
|
-
await fs.unlink(
|
|
114
|
+
await fs.unlink(authFile);
|
|
59
115
|
}
|
|
60
116
|
}
|
|
61
117
|
catch (error) {
|
package/dist/auth-storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-storage.js","sourceRoot":"","sources":["../src/auth-storage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"auth-storage.js","sourceRoot":"","sources":["../src/auth-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,cAAc,GAAG,UAAU,CAAC;AAclC;;;;GAIG;AACH,SAAS,WAAW,CAClB,QAAyB,EACzB,GAAiB,EACjB,MAAc;IAEd,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,IAAI,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;YACpB,OA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
9
|
export { queryEvents, pollEvents, type EventData, type QueryEventsOptions, } from './events.js';
|
|
10
10
|
export type { ProcessState, ProcessTransition, ProcessNotification, ProcessAction, ProcessDefinition, } from './types.js';
|
|
11
11
|
export { parseProcessFile, serializeProcess, } from './edn-process.js';
|
|
12
|
-
export { readAuth, writeAuth, clearAuth, type AuthData, } from './auth-storage.js';
|
|
12
|
+
export { readAuth, writeAuth, clearAuth, configDirFor, resolveConfigDir, getAuthFilePath, type AuthData, type ConfigDirEnv, } from './auth-storage.js';
|
|
13
13
|
export { pullAssets, pushAssets, stageAsset, type Asset, type PullAssetsResult, type PushAssetsResult, type StageAssetResult, } from './assets.js';
|
|
14
14
|
export { sendNotification, previewNotification, type EmailTemplate, type NotificationOptions, } from './notifications.js';
|
|
15
15
|
export { getListingApprovalStatus, enableListingApproval, disableListingApproval, } from './listing-approval.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,UAAU,EACV,KAAK,SAAS,EACd,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,UAAU,EACV,KAAK,SAAS,EACd,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { queryEvents, pollEvents, } from './events.js';
|
|
|
14
14
|
// Export EDN process utilities
|
|
15
15
|
export { parseProcessFile, serializeProcess, } from './edn-process.js';
|
|
16
16
|
// Export authentication functions
|
|
17
|
-
export { readAuth, writeAuth, clearAuth, } from './auth-storage.js';
|
|
17
|
+
export { readAuth, writeAuth, clearAuth, configDirFor, resolveConfigDir, getAuthFilePath, } from './auth-storage.js';
|
|
18
18
|
// Export asset management functions
|
|
19
19
|
export { pullAssets, pushAssets, stageAsset, } from './assets.js';
|
|
20
20
|
// Export notification management functions
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sCAAsC;AACtC,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,GAOZ,MAAM,gBAAgB,CAAC;AAExB,sCAAsC;AACtC,OAAO,EACL,aAAa,GAGd,MAAM,aAAa,CAAC;AAErB,4CAA4C;AAC5C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AAErB,gCAAgC;AAChC,OAAO,EACL,WAAW,EACX,UAAU,GAGX,MAAM,aAAa,CAAC;AAWrB,+BAA+B;AAC/B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,kCAAkC;AAClC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sCAAsC;AACtC,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,GAOZ,MAAM,gBAAgB,CAAC;AAExB,sCAAsC;AACtC,OAAO,EACL,aAAa,GAGd,MAAM,aAAa,CAAC;AAErB,4CAA4C;AAC5C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AAErB,gCAAgC;AAChC,OAAO,EACL,WAAW,EACX,UAAU,GAGX,MAAM,aAAa,CAAC;AAWrB,+BAA+B;AAC/B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,kCAAkC;AAClC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAGhB,MAAM,mBAAmB,CAAC;AAE3B,oCAAoC;AACpC,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,GAKX,MAAM,aAAa,CAAC;AAErB,2CAA2C;AAC3C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,oBAAoB,CAAC;AAE5B,oCAAoC;AACpC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAE1B,MAAM,aAAa,CAAC;AAErB,+BAA+B;AAC/B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
package/dist/processes.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface AliasResult {
|
|
|
38
38
|
/**
|
|
39
39
|
* Lists all processes for a marketplace
|
|
40
40
|
*
|
|
41
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
41
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
42
42
|
* @param marketplace - Marketplace ID
|
|
43
43
|
* @returns Array of processes with their latest versions
|
|
44
44
|
*/
|
package/dist/processes.js
CHANGED
|
@@ -8,7 +8,7 @@ import { keyword, keywordMap } from './api/transit.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* Lists all processes for a marketplace
|
|
10
10
|
*
|
|
11
|
-
* @param apiKey - Optional Sharetribe API key. If not provided, reads from
|
|
11
|
+
* @param apiKey - Optional Sharetribe API key. If not provided, reads from flex-cli's auth.edn (see getAuthFilePath)
|
|
12
12
|
* @param marketplace - Marketplace ID
|
|
13
13
|
* @returns Array of processes with their latest versions
|
|
14
14
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sharetribe-flex-build-sdk",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.10",
|
|
4
4
|
"description": "SDK for building and managing Sharetribe Flex transaction processes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/
|
|
43
|
+
"url": "https://github.com/sharetribe-community/sharetribe-cli",
|
|
44
44
|
"directory": "packages/sharetribe-flex-build-sdk"
|
|
45
45
|
},
|
|
46
|
-
"homepage": "https://github.com/
|
|
46
|
+
"homepage": "https://github.com/sharetribe-community/sharetribe-cli/tree/master/packages/sharetribe-flex-build-sdk",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"jsedn": "^0.4.1",
|
|
49
49
|
"transit-js": "^0.8.874"
|