@tailor-platform/sdk 0.10.1 → 0.10.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#45](https://github.com/tailor-platform/sdk/pull/45) [`efba21f`](https://github.com/tailor-platform/sdk/commit/efba21f0991a3ee9068684d13407dbdb0b19c425) Thanks [@remiposo](https://github.com/remiposo)! - Callback to localhost on WSL environments
|
|
8
|
+
|
|
9
|
+
Adjusted the redirect_uri value to fix an issue where login fails on WSL environments.
|
|
10
|
+
|
|
3
11
|
## 0.10.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cli/api.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../
|
|
1
|
+
import "../config-C5UYYrp1.mjs";
|
|
2
|
+
import { apply, generate, generateUserTypes, loadConfig, machineUserList, machineUserToken, show, workspaceCreate, workspaceDelete, workspaceList } from "../token-B-1pOHj2.mjs";
|
|
3
3
|
|
|
4
4
|
export { apply, generate, generateUserTypes, loadConfig, machineUserList, machineUserToken, show, workspaceCreate, workspaceDelete, workspaceList };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import "../
|
|
2
|
+
import "../config-C5UYYrp1.mjs";
|
|
3
|
+
import { PATScope, applyCommand, commonArgs, createCommand, deleteCommand, fetchAll, fetchLatestToken, formatArgs, generateCommand, initOperatorClient, listCommand as listCommand$4, listCommand$1 as listCommand, loadAccessToken, loadConfig, loadConfigPath, loadWorkspaceId, parseFormat, printWithFormat, readPackageJson, readPlatformConfig, showCommand, tokenCommand, userAgent, withCommonArgs, writePlatformConfig } from "../token-B-1pOHj2.mjs";
|
|
4
4
|
import { register } from "node:module";
|
|
5
5
|
import { defineCommand, runCommand, runMain } from "citty";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -10,6 +10,7 @@ import chalk from "chalk";
|
|
|
10
10
|
import { spawnSync } from "node:child_process";
|
|
11
11
|
import * as crypto from "node:crypto";
|
|
12
12
|
import * as http from "node:http";
|
|
13
|
+
import isWsl from "is-wsl";
|
|
13
14
|
import open from "open";
|
|
14
15
|
|
|
15
16
|
//#region src/cli/init.ts
|
|
@@ -67,7 +68,7 @@ const initCommand = defineCommand({
|
|
|
67
68
|
//#endregion
|
|
68
69
|
//#region src/cli/login.ts
|
|
69
70
|
const CALLBACK_PORT = 8085;
|
|
70
|
-
const CALLBACK_URL = `http://tailorctl.tailor.tech:${CALLBACK_PORT}/callback`;
|
|
71
|
+
const CALLBACK_URL = isWsl ? `http://localhost:${CALLBACK_PORT}/callback` : `http://tailorctl.tailor.tech:${CALLBACK_PORT}/callback`;
|
|
71
72
|
const PLATFORM_AUTH_URL = "https://api.tailor.tech/auth/platform";
|
|
72
73
|
const LOGIN_URL = PLATFORM_AUTH_URL + "/login";
|
|
73
74
|
const TOKEN_URL = PLATFORM_AUTH_URL + "/token";
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TailorField, db, defineAuth, defineConfig, defineGenerators, t as t$1, unauthenticatedTailorUser } from "../
|
|
1
|
+
import { TailorField, db, defineAuth, defineConfig, defineGenerators, t as t$1, unauthenticatedTailorUser } from "../config-C5UYYrp1.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/configure/services/resolver/resolver.ts
|
|
4
4
|
function createResolver(config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/configure/index.mjs",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"consola": "3.4.2",
|
|
52
52
|
"es-toolkit": "1.41.0",
|
|
53
53
|
"inflection": "3.0.2",
|
|
54
|
+
"is-wsl": "3.1.0",
|
|
54
55
|
"madge": "8.0.0",
|
|
55
56
|
"multiline-ts": "4.0.1",
|
|
56
57
|
"open": "10.2.0",
|
|
@@ -708,6 +708,21 @@ const db = {
|
|
|
708
708
|
}) }
|
|
709
709
|
};
|
|
710
710
|
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/configure/services/auth/index.ts
|
|
713
|
+
function defineAuth(name, config) {
|
|
714
|
+
return {
|
|
715
|
+
...config,
|
|
716
|
+
name,
|
|
717
|
+
invoker(machineUser) {
|
|
718
|
+
return {
|
|
719
|
+
authName: name,
|
|
720
|
+
machineUser
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
|
|
711
726
|
//#endregion
|
|
712
727
|
//#region src/configure/config.ts
|
|
713
728
|
let distPath = null;
|
|
@@ -724,20 +739,5 @@ function defineGenerators(...configs) {
|
|
|
724
739
|
return configs;
|
|
725
740
|
}
|
|
726
741
|
|
|
727
|
-
//#endregion
|
|
728
|
-
//#region src/configure/services/auth/index.ts
|
|
729
|
-
function defineAuth(name, config) {
|
|
730
|
-
return {
|
|
731
|
-
...config,
|
|
732
|
-
name,
|
|
733
|
-
invoker(machineUser) {
|
|
734
|
-
return {
|
|
735
|
-
authName: name,
|
|
736
|
-
machineUser
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
|
|
742
742
|
//#endregion
|
|
743
743
|
export { TailorField, db, defineAuth, defineConfig, defineGenerators, getDistDir, t, tailorUserMap, unauthenticatedTailorUser };
|