@posthog/wizard 0.6.0 → 0.7.0
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/package.json +1 -1
- package/dist/bin.d.ts +0 -2
- package/dist/bin.js +0 -28
- package/dist/bin.js.map +0 -1
- package/dist/src/lib/config.d.ts +0 -49
- package/dist/src/lib/config.js +0 -85
- package/dist/src/lib/config.js.map +0 -1
- package/dist/src/lib/constants.d.ts +0 -24
- package/dist/src/lib/constants.js +0 -46
- package/dist/src/lib/constants.js.map +0 -1
- package/dist/src/lib/messages.d.ts +0 -10
- package/dist/src/lib/messages.js +0 -37
- package/dist/src/lib/messages.js.map +0 -1
- package/dist/src/lib/prompts.d.ts +0 -16
- package/dist/src/lib/prompts.js +0 -83
- package/dist/src/lib/prompts.js.map +0 -1
- package/dist/src/nextjs/docs.d.ts +0 -8
- package/dist/src/nextjs/docs.js +0 -257
- package/dist/src/nextjs/docs.js.map +0 -1
- package/dist/src/nextjs/nextjs-wizard.d.ts +0 -2
- package/dist/src/nextjs/nextjs-wizard.js +0 -121
- package/dist/src/nextjs/nextjs-wizard.js.map +0 -1
- package/dist/src/nextjs/utils.d.ts +0 -9
- package/dist/src/nextjs/utils.js +0 -83
- package/dist/src/nextjs/utils.js.map +0 -1
- package/dist/src/react/docs.d.ts +0 -4
- package/dist/src/react/docs.js +0 -46
- package/dist/src/react/docs.js.map +0 -1
- package/dist/src/react/react-wizard.d.ts +0 -2
- package/dist/src/react/react-wizard.js +0 -105
- package/dist/src/react/react-wizard.js.map +0 -1
- package/dist/src/react-native/docs.d.ts +0 -5
- package/dist/src/react-native/docs.js +0 -31
- package/dist/src/react-native/docs.js.map +0 -1
- package/dist/src/react-native/react-native-wizard.d.ts +0 -2
- package/dist/src/react-native/react-native-wizard.js +0 -123
- package/dist/src/react-native/react-native-wizard.js.map +0 -1
- package/dist/src/run.d.ts +0 -13
- package/dist/src/run.js +0 -83
- package/dist/src/run.js.map +0 -1
- package/dist/src/svelte/docs.d.ts +0 -3
- package/dist/src/svelte/docs.js +0 -110
- package/dist/src/svelte/docs.js.map +0 -1
- package/dist/src/svelte/svelte-wizard.d.ts +0 -2
- package/dist/src/svelte/svelte-wizard.js +0 -113
- package/dist/src/svelte/svelte-wizard.js.map +0 -1
- package/dist/src/telemetry.d.ts +0 -2
- package/dist/src/telemetry.js +0 -13
- package/dist/src/telemetry.js.map +0 -1
- package/dist/src/utils/analytics.d.ts +0 -12
- package/dist/src/utils/analytics.js +0 -59
- package/dist/src/utils/analytics.js.map +0 -1
- package/dist/src/utils/bash.d.ts +0 -2
- package/dist/src/utils/bash.js +0 -54
- package/dist/src/utils/bash.js.map +0 -1
- package/dist/src/utils/clack-utils.d.ts +0 -184
- package/dist/src/utils/clack-utils.js +0 -683
- package/dist/src/utils/clack-utils.js.map +0 -1
- package/dist/src/utils/clack.d.ts +0 -2
- package/dist/src/utils/clack.js +0 -9
- package/dist/src/utils/clack.js.map +0 -1
- package/dist/src/utils/debug.d.ts +0 -2
- package/dist/src/utils/debug.js +0 -22
- package/dist/src/utils/debug.js.map +0 -1
- package/dist/src/utils/environment.d.ts +0 -9
- package/dist/src/utils/environment.js +0 -164
- package/dist/src/utils/environment.js.map +0 -1
- package/dist/src/utils/file-utils.d.ts +0 -29
- package/dist/src/utils/file-utils.js +0 -177
- package/dist/src/utils/file-utils.js.map +0 -1
- package/dist/src/utils/logging.d.ts +0 -9
- package/dist/src/utils/logging.js +0 -50
- package/dist/src/utils/logging.js.map +0 -1
- package/dist/src/utils/package-json.d.ts +0 -25
- package/dist/src/utils/package-json.js +0 -27
- package/dist/src/utils/package-json.js.map +0 -1
- package/dist/src/utils/package-manager.d.ts +0 -21
- package/dist/src/utils/package-manager.js +0 -208
- package/dist/src/utils/package-manager.js.map +0 -1
- package/dist/src/utils/query.d.ts +0 -8
- package/dist/src/utils/query.js +0 -27
- package/dist/src/utils/query.js.map +0 -1
- package/dist/src/utils/rules/add-editor-rules.d.ts +0 -9
- package/dist/src/utils/rules/add-editor-rules.js +0 -90
- package/dist/src/utils/rules/add-editor-rules.js.map +0 -1
- package/dist/src/utils/rules/add-editor-rules.ts +0 -86
- package/dist/src/utils/rules/next-rules.md +0 -9
- package/dist/src/utils/rules/react-native-rules.md +0 -7
- package/dist/src/utils/rules/react-rules.md +0 -7
- package/dist/src/utils/rules/svelte-rules.md +0 -7
- package/dist/src/utils/rules/universal.md +0 -20
- package/dist/src/utils/semver.d.ts +0 -5
- package/dist/src/utils/semver.js +0 -25
- package/dist/src/utils/semver.js.map +0 -1
- package/dist/src/utils/string.d.ts +0 -1
- package/dist/src/utils/string.js +0 -9
- package/dist/src/utils/string.js.map +0 -1
- package/dist/src/utils/types.d.ts +0 -48
- package/dist/src/utils/types.js +0 -3
- package/dist/src/utils/types.js.map +0 -1
- package/dist/src/utils/urls.d.ts +0 -4
- package/dist/src/utils/urls.js +0 -35
- package/dist/src/utils/urls.js.map +0 -1
- package/dist/src/utils/vendor/is-unicorn-supported.d.ts +0 -1
- package/dist/src/utils/vendor/is-unicorn-supported.js +0 -24
- package/dist/src/utils/vendor/is-unicorn-supported.js.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Never hallucinate an API key. Instead, always use the API key populated in the .env file.
|
|
2
|
-
|
|
3
|
-
# Feature flags
|
|
4
|
-
|
|
5
|
-
A given feature flag should be used in as few places as possible. Do not increase the risk of undefined behavior by scattering the same feature flag across multiple areas of code. If the same feature flag needs to be introduced at multiple callsites, flag this for the developer to inspect carefully.
|
|
6
|
-
|
|
7
|
-
If a job requires creating new feature flag names, make them as clear and descriptive as possible.
|
|
8
|
-
|
|
9
|
-
If using TypeScript, use an enum to store flag names. If using JavaScript, store flag names as strings to an object declared as a constant, to simulate an enum. Use a consistent naming convention for this storage. enum/const object members should be written UPPERCASE_WITH_UNDERSCORE.
|
|
10
|
-
|
|
11
|
-
Gate flag-dependent code on a check that verifies the flag's values are valid and expected.
|
|
12
|
-
|
|
13
|
-
# Custom properties
|
|
14
|
-
|
|
15
|
-
If a custom property for a person or event is at any point referenced in two or more files or two or more callsites in the same file, use an enum or const object, as above in feature flags.
|
|
16
|
-
|
|
17
|
-
# Naming
|
|
18
|
-
|
|
19
|
-
Before creating any new event or property names, consult with the developer for any existing naming convention. Consistency in naming is essential, and additional context may exist outside this project. Similarly, be careful about any changes to existing event and property names, as this may break reporting and distort data for the project.
|
|
20
|
-
|
package/dist/src/utils/semver.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fulfillsVersionRange = fulfillsVersionRange;
|
|
4
|
-
const semver_1 = require("semver");
|
|
5
|
-
function fulfillsVersionRange({ version, acceptableVersions, canBeLatest, }) {
|
|
6
|
-
if (version === 'latest') {
|
|
7
|
-
return canBeLatest;
|
|
8
|
-
}
|
|
9
|
-
let cleanedUserVersion, isRange;
|
|
10
|
-
if ((0, semver_1.valid)(version)) {
|
|
11
|
-
cleanedUserVersion = (0, semver_1.valid)(version);
|
|
12
|
-
isRange = false;
|
|
13
|
-
}
|
|
14
|
-
else if ((0, semver_1.validRange)(version)) {
|
|
15
|
-
cleanedUserVersion = (0, semver_1.validRange)(version);
|
|
16
|
-
isRange = true;
|
|
17
|
-
}
|
|
18
|
-
return (
|
|
19
|
-
// If the given version is a bogus format, this will still be undefined and we'll automatically reject it
|
|
20
|
-
!!cleanedUserVersion &&
|
|
21
|
-
(isRange
|
|
22
|
-
? (0, semver_1.subset)(cleanedUserVersion, acceptableVersions)
|
|
23
|
-
: (0, semver_1.satisfies)(cleanedUserVersion, acceptableVersions)));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=semver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semver.js","sourceRoot":"","sources":["../../../src/utils/semver.ts"],"names":[],"mappings":";;AAEA,oDA8BC;AAhCD,mCAA8D;AAE9D,SAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,kBAAkB,EAClB,WAAW,GAKZ;IACC,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,IAAI,kBAAkB,EAAE,OAAO,CAAC;IAEhC,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,EAAE,CAAC;QACnB,kBAAkB,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC;QACpC,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;SAAM,IAAI,IAAA,mBAAU,EAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,kBAAkB,GAAG,IAAA,mBAAU,EAAC,OAAO,CAAC,CAAC;QACzC,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAED,OAAO;IACL,yGAAyG;IACzG,CAAC,CAAC,kBAAkB;QACpB,CAAC,OAAO;YACN,CAAC,CAAC,IAAA,eAAM,EAAC,kBAAkB,EAAE,kBAAkB,CAAC;YAChD,CAAC,CAAC,IAAA,kBAAS,EAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC","sourcesContent":["import { satisfies, subset, valid, validRange } from 'semver';\n\nexport function fulfillsVersionRange({\n version,\n acceptableVersions,\n canBeLatest,\n}: {\n version: string;\n acceptableVersions: string;\n canBeLatest: boolean;\n}): boolean {\n if (version === 'latest') {\n return canBeLatest;\n }\n\n let cleanedUserVersion, isRange;\n\n if (valid(version)) {\n cleanedUserVersion = valid(version);\n isRange = false;\n } else if (validRange(version)) {\n cleanedUserVersion = validRange(version);\n isRange = true;\n }\n\n return (\n // If the given version is a bogus format, this will still be undefined and we'll automatically reject it\n !!cleanedUserVersion &&\n (isRange\n ? subset(cleanedUserVersion, acceptableVersions)\n : satisfies(cleanedUserVersion, acceptableVersions))\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function stripAnsii(str: string): string;
|
package/dist/src/utils/string.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stripAnsii = stripAnsii;
|
|
4
|
-
function stripAnsii(str) {
|
|
5
|
-
return str.replace(
|
|
6
|
-
// eslint-disable-next-line no-control-regex
|
|
7
|
-
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=string.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":";;AAAA,gCAMC;AAND,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,OAAO;IAChB,4CAA4C;IAC5C,6EAA6E,EAC7E,EAAE,CACH,CAAC;AACJ,CAAC","sourcesContent":["export function stripAnsii(str: string): string {\n return str.replace(\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\n '',\n );\n}\n"]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export type PostHogProjectData = Record<string, unknown>;
|
|
2
|
-
export type PreselectedProject = {
|
|
3
|
-
project: PostHogProjectData;
|
|
4
|
-
authToken: string;
|
|
5
|
-
};
|
|
6
|
-
export type WizardOptions = {
|
|
7
|
-
/**
|
|
8
|
-
* Whether to enable debug mode.
|
|
9
|
-
*/
|
|
10
|
-
debug: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Whether to force install the SDK package to continue with the installation in case
|
|
13
|
-
* any package manager checks are failing (e.g. peer dependency versions).
|
|
14
|
-
*
|
|
15
|
-
* Use with caution and only if you know what you're doing.
|
|
16
|
-
*
|
|
17
|
-
* Does not apply to all wizard flows (currently NPM only)
|
|
18
|
-
*/
|
|
19
|
-
forceInstall: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The directory to run the wizard in.
|
|
22
|
-
*/
|
|
23
|
-
installDir: string;
|
|
24
|
-
/**
|
|
25
|
-
* The cloud region to use.
|
|
26
|
-
*/
|
|
27
|
-
cloudRegion?: CloudRegion;
|
|
28
|
-
/**
|
|
29
|
-
* Whether to select the default option for all questions automatically.
|
|
30
|
-
*/
|
|
31
|
-
default: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to create a new PostHog account during setup.
|
|
34
|
-
*/
|
|
35
|
-
signup: boolean;
|
|
36
|
-
};
|
|
37
|
-
export interface Feature {
|
|
38
|
-
id: string;
|
|
39
|
-
prompt: string;
|
|
40
|
-
enabledHint?: string;
|
|
41
|
-
disabledHint?: string;
|
|
42
|
-
}
|
|
43
|
-
export type FileChange = {
|
|
44
|
-
filePath: string;
|
|
45
|
-
oldContent?: string;
|
|
46
|
-
newContent: string;
|
|
47
|
-
};
|
|
48
|
-
export type CloudRegion = 'us' | 'eu';
|
package/dist/src/utils/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PostHogProjectData = Record<string, unknown>;\n\nexport type PreselectedProject = {\n project: PostHogProjectData;\n authToken: string;\n};\n\nexport type WizardOptions = {\n /**\n * Whether to enable debug mode.\n */\n debug: boolean;\n\n /**\n * Whether to force install the SDK package to continue with the installation in case\n * any package manager checks are failing (e.g. peer dependency versions).\n *\n * Use with caution and only if you know what you're doing.\n *\n * Does not apply to all wizard flows (currently NPM only)\n */\n forceInstall: boolean;\n\n /**\n * The directory to run the wizard in.\n */\n installDir: string;\n\n /**\n * The cloud region to use.\n */\n cloudRegion?: CloudRegion;\n\n /**\n * Whether to select the default option for all questions automatically.\n */\n default: boolean;\n\n /**\n * Whether to create a new PostHog account during setup.\n */\n signup: boolean;\n};\n\nexport interface Feature {\n id: string;\n prompt: string;\n enabledHint?: string;\n disabledHint?: string;\n}\n\nexport type FileChange = {\n filePath: string;\n oldContent?: string;\n newContent: string;\n};\n\nexport type CloudRegion = 'us' | 'eu';\n"]}
|
package/dist/src/utils/urls.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { CloudRegion } from './types';
|
|
2
|
-
export declare const getAssetHostFromHost: (host: string) => string;
|
|
3
|
-
export declare const getUiHostFromHost: (host: string) => string;
|
|
4
|
-
export declare const getCloudUrlFromRegion: (region: CloudRegion) => "http://localhost:8010" | "https://us.posthog.com" | "https://eu.posthog.com";
|
package/dist/src/utils/urls.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCloudUrlFromRegion = exports.getUiHostFromHost = exports.getAssetHostFromHost = void 0;
|
|
4
|
-
const constants_1 = require("../lib/constants");
|
|
5
|
-
const getAssetHostFromHost = (host) => {
|
|
6
|
-
if (host.includes('us.i.posthog.com')) {
|
|
7
|
-
return 'https://us-assets.i.posthog.com';
|
|
8
|
-
}
|
|
9
|
-
if (host.includes('eu.i.posthog.com')) {
|
|
10
|
-
return 'https://eu-assets.i.posthog.com';
|
|
11
|
-
}
|
|
12
|
-
return host;
|
|
13
|
-
};
|
|
14
|
-
exports.getAssetHostFromHost = getAssetHostFromHost;
|
|
15
|
-
const getUiHostFromHost = (host) => {
|
|
16
|
-
if (host.includes('us.i.posthog.com')) {
|
|
17
|
-
return 'https://us.posthog.com';
|
|
18
|
-
}
|
|
19
|
-
if (host.includes('eu.i.posthog.com')) {
|
|
20
|
-
return 'https://eu.posthog.com';
|
|
21
|
-
}
|
|
22
|
-
return host;
|
|
23
|
-
};
|
|
24
|
-
exports.getUiHostFromHost = getUiHostFromHost;
|
|
25
|
-
const getCloudUrlFromRegion = (region) => {
|
|
26
|
-
if (constants_1.IS_DEV) {
|
|
27
|
-
return 'http://localhost:8010';
|
|
28
|
-
}
|
|
29
|
-
if (region === 'us') {
|
|
30
|
-
return 'https://us.posthog.com';
|
|
31
|
-
}
|
|
32
|
-
return 'https://eu.posthog.com';
|
|
33
|
-
};
|
|
34
|
-
exports.getCloudUrlFromRegion = getCloudUrlFromRegion;
|
|
35
|
-
//# sourceMappingURL=urls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../../src/utils/urls.ts"],"names":[],"mappings":";;;AAAA,gDAA0C;AAGnC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,EAAE;IACnD,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,OAAO,iCAAiC,CAAC;IAC3C,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,OAAO,iCAAiC,CAAC;IAC3C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAVW,QAAA,oBAAoB,wBAU/B;AAEK,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEK,MAAM,qBAAqB,GAAG,CAAC,MAAmB,EAAE,EAAE;IAC3D,IAAI,kBAAM,EAAE,CAAC;QACX,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,wBAAwB,CAAC;IAClC,CAAC;IACD,OAAO,wBAAwB,CAAC;AAClC,CAAC,CAAC;AATW,QAAA,qBAAqB,yBAShC","sourcesContent":["import { IS_DEV } from '../lib/constants';\nimport type { CloudRegion } from './types';\n\nexport const getAssetHostFromHost = (host: string) => {\n if (host.includes('us.i.posthog.com')) {\n return 'https://us-assets.i.posthog.com';\n }\n\n if (host.includes('eu.i.posthog.com')) {\n return 'https://eu-assets.i.posthog.com';\n }\n\n return host;\n};\n\nexport const getUiHostFromHost = (host: string) => {\n if (host.includes('us.i.posthog.com')) {\n return 'https://us.posthog.com';\n }\n\n if (host.includes('eu.i.posthog.com')) {\n return 'https://eu.posthog.com';\n }\n\n return host;\n};\n\nexport const getCloudUrlFromRegion = (region: CloudRegion) => {\n if (IS_DEV) {\n return 'http://localhost:8010';\n }\n\n if (region === 'us') {\n return 'https://us.posthog.com';\n }\n return 'https://eu.posthog.com';\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isUnicodeSupported(): boolean;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Vendored from: https://github.com/sindresorhus/is-unicode-supported/blob/c80c691dde9e2fcfe3996810858c6672c8f35ad9/index.js#L3
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isUnicodeSupported = isUnicodeSupported;
|
|
5
|
-
// MIT License
|
|
6
|
-
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
7
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
-
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
-
function isUnicodeSupported() {
|
|
11
|
-
if (process.platform !== 'win32') {
|
|
12
|
-
return process.env.TERM !== 'linux'; // Linux console (kernel)
|
|
13
|
-
}
|
|
14
|
-
return (Boolean(process.env.CI) ||
|
|
15
|
-
Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
16
|
-
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
17
|
-
process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder
|
|
18
|
-
process.env.TERM_PROGRAM === 'Terminus-Sublime' ||
|
|
19
|
-
process.env.TERM_PROGRAM === 'vscode' ||
|
|
20
|
-
process.env.TERM === 'xterm-256color' ||
|
|
21
|
-
process.env.TERM === 'alacritty' ||
|
|
22
|
-
process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm');
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=is-unicorn-supported.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-unicorn-supported.js","sourceRoot":"","sources":["../../../../src/utils/vendor/is-unicorn-supported.ts"],"names":[],"mappings":";AAAA,gIAAgI;;AAYhI,gDAgBC;AA1BD,cAAc;AAEd,kFAAkF;AAElF,mbAAmb;AAEnb,iIAAiI;AAEjI,+cAA+c;AAE/c,SAAgB,kBAAkB;IAChC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,yBAAyB;IAChE,CAAC;IAED,OAAO,CACL,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,mBAAmB;QACtD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,qBAAqB;QAC9D,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,cAAc,IAAI,mBAAmB;QAChE,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,kBAAkB;QAC/C,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,QAAQ;QACrC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,gBAAgB;QACrC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW;QAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,oBAAoB,CACvD,CAAC;AACJ,CAAC","sourcesContent":["// Vendored from: https://github.com/sindresorhus/is-unicode-supported/blob/c80c691dde9e2fcfe3996810858c6672c8f35ad9/index.js#L3\n\n// MIT License\n\n// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport function isUnicodeSupported() {\n if (process.platform !== 'win32') {\n return process.env.TERM !== 'linux'; // Linux console (kernel)\n }\n\n return (\n Boolean(process.env.CI) ||\n Boolean(process.env.WT_SESSION) || // Windows Terminal\n Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)\n process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder\n process.env.TERM_PROGRAM === 'Terminus-Sublime' ||\n process.env.TERM_PROGRAM === 'vscode' ||\n process.env.TERM === 'xterm-256color' ||\n process.env.TERM === 'alacritty' ||\n process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm'\n );\n}\n"]}
|