yeet
This commit is contained in:
10
node_modules/@expo/configure-splash-screen/build/utils/StateManager.d.ts
generated
vendored
Normal file
10
node_modules/@expo/configure-splash-screen/build/utils/StateManager.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
export default class StateManager<StateType, AppliedActionResultType, ActionName extends string = never> {
|
||||
state: StateType;
|
||||
constructor(state: StateType);
|
||||
appliedActions: {
|
||||
[K in ActionName]: AppliedActionResultType;
|
||||
};
|
||||
applyAction: <NewActionName extends string>(action: (content: StateType, actions: {
|
||||
[K in ActionName]: AppliedActionResultType;
|
||||
}) => [StateType, NewActionName, AppliedActionResultType]) => StateManager<StateType, AppliedActionResultType, ActionName | NewActionName>;
|
||||
}
|
19
node_modules/@expo/configure-splash-screen/build/utils/StateManager.js
generated
vendored
Normal file
19
node_modules/@expo/configure-splash-screen/build/utils/StateManager.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class StateManager {
|
||||
constructor(state) {
|
||||
this.state = state;
|
||||
// @ts-ignore
|
||||
this.appliedActions = {};
|
||||
// @ts-ignore
|
||||
this.applyAction = action => {
|
||||
const [state, actionName, appliedAction] = action(this.state, this.appliedActions);
|
||||
this.state = state;
|
||||
// @ts-ignore
|
||||
this.appliedActions[actionName] = appliedAction;
|
||||
return this;
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.default = StateManager;
|
||||
//# sourceMappingURL=StateManager.js.map
|
1
node_modules/@expo/configure-splash-screen/build/utils/StateManager.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/utils/StateManager.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"StateManager.js","sourceRoot":"","sources":["../../src/utils/StateManager.ts"],"names":[],"mappings":";;AAAA,MAAqB,YAAY;IAK/B,YAAmB,KAAgB;QAAhB,UAAK,GAAL,KAAK,CAAW;QACnC,aAAa;QACb,mBAAc,GAAmD,EAAE,CAAC;QACpE,aAAa;QACb,gBAAW,GAKyE,MAAM,CAAC,EAAE;YAC3F,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YACnF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,aAAa;YACb,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC;YAChD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;IAfoC,CAAC;CAgBxC;AArBD,+BAqBC","sourcesContent":["export default class StateManager<\n StateType,\n AppliedActionResultType,\n ActionName extends string = never\n> {\n constructor(public state: StateType) {}\n // @ts-ignore\n appliedActions: { [K in ActionName]: AppliedActionResultType } = {};\n // @ts-ignore\n applyAction: <NewActionName extends string>(\n action: (\n content: StateType,\n actions: { [K in ActionName]: AppliedActionResultType }\n ) => [StateType, NewActionName, AppliedActionResultType]\n ) => StateManager<StateType, AppliedActionResultType, ActionName | NewActionName> = action => {\n const [state, actionName, appliedAction] = action(this.state, this.appliedActions);\n this.state = state;\n // @ts-ignore\n this.appliedActions[actionName] = appliedAction;\n return this;\n };\n}\n"]}
|
9
node_modules/@expo/configure-splash-screen/build/utils/file-utils.d.ts
generated
vendored
Normal file
9
node_modules/@expo/configure-splash-screen/build/utils/file-utils.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Creates file with given content with possible parent directories creation.
|
||||
*/
|
||||
export declare function createDirAndWriteFile(filePath: string, content: string): Promise<void>;
|
||||
/**
|
||||
* Reads given file as UTF-8 with fallback to given content when file is not found.
|
||||
*/
|
||||
export declare function readFileWithFallback(filePath: string, fallbackContent?: string): Promise<string>;
|
||||
export declare function removeFileIfExists(filePath: string): Promise<void>;
|
38
node_modules/@expo/configure-splash-screen/build/utils/file-utils.js
generated
vendored
Normal file
38
node_modules/@expo/configure-splash-screen/build/utils/file-utils.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeFileIfExists = exports.readFileWithFallback = exports.createDirAndWriteFile = void 0;
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
/**
|
||||
* Creates file with given content with possible parent directories creation.
|
||||
*/
|
||||
async function createDirAndWriteFile(filePath, content) {
|
||||
if (!(await fs_extra_1.default.pathExists(path_1.default.dirname(filePath)))) {
|
||||
await fs_extra_1.default.mkdirp(path_1.default.dirname(filePath));
|
||||
}
|
||||
await fs_extra_1.default.writeFile(filePath, content);
|
||||
}
|
||||
exports.createDirAndWriteFile = createDirAndWriteFile;
|
||||
/**
|
||||
* Reads given file as UTF-8 with fallback to given content when file is not found.
|
||||
*/
|
||||
async function readFileWithFallback(filePath, fallbackContent) {
|
||||
if (await fs_extra_1.default.pathExists(filePath)) {
|
||||
return fs_extra_1.default.readFile(filePath, 'utf-8');
|
||||
}
|
||||
if (fallbackContent) {
|
||||
return fallbackContent;
|
||||
}
|
||||
throw Error(`File not found ${filePath}`);
|
||||
}
|
||||
exports.readFileWithFallback = readFileWithFallback;
|
||||
async function removeFileIfExists(filePath) {
|
||||
if (await fs_extra_1.default.pathExists(filePath)) {
|
||||
await fs_extra_1.default.unlink(filePath);
|
||||
}
|
||||
}
|
||||
exports.removeFileIfExists = removeFileIfExists;
|
||||
//# sourceMappingURL=file-utils.js.map
|
1
node_modules/@expo/configure-splash-screen/build/utils/file-utils.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/utils/file-utils.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAExB;;GAEG;AACI,KAAK,UAAU,qBAAqB,CAAC,QAAgB,EAAE,OAAe;IAC3E,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QAClD,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;KACzC;IACD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AALD,sDAKC;AAED;;GAEG;AACI,KAAK,UAAU,oBAAoB,CAAC,QAAgB,EAAE,eAAwB;IACnF,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACjC,OAAO,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACvC;IACD,IAAI,eAAe,EAAE;QACnB,OAAO,eAAe,CAAC;KACxB;IACD,MAAM,KAAK,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;AAC5C,CAAC;AARD,oDAQC;AAEM,KAAK,UAAU,kBAAkB,CAAC,QAAgB;IACvD,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACjC,MAAM,kBAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KAC3B;AACH,CAAC;AAJD,gDAIC","sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\n\n/**\n * Creates file with given content with possible parent directories creation.\n */\nexport async function createDirAndWriteFile(filePath: string, content: string) {\n if (!(await fs.pathExists(path.dirname(filePath)))) {\n await fs.mkdirp(path.dirname(filePath));\n }\n await fs.writeFile(filePath, content);\n}\n\n/**\n * Reads given file as UTF-8 with fallback to given content when file is not found.\n */\nexport async function readFileWithFallback(filePath: string, fallbackContent?: string) {\n if (await fs.pathExists(filePath)) {\n return fs.readFile(filePath, 'utf-8');\n }\n if (fallbackContent) {\n return fallbackContent;\n }\n throw Error(`File not found ${filePath}`);\n}\n\nexport async function removeFileIfExists(filePath: string) {\n if (await fs.pathExists(filePath)) {\n await fs.unlink(filePath);\n }\n}\n"]}
|
16
node_modules/@expo/configure-splash-screen/build/utils/string-utils.d.ts
generated
vendored
Normal file
16
node_modules/@expo/configure-splash-screen/build/utils/string-utils.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import 'core-js/es/string/match-all';
|
||||
/**
|
||||
* @returns [`true`, modifiedContent: string] if replacement is successful, [`false`, originalContent] otherwise.
|
||||
*/
|
||||
export declare function replace(content: string, { replaceContent, replacePattern }: {
|
||||
replaceContent: string;
|
||||
replacePattern: string | RegExp;
|
||||
}): [boolean, string];
|
||||
/**
|
||||
* Inserts content just before first occurrence of provided pattern.
|
||||
* @returns [`true`, modifiedContent: string] if insertion is successful, [`false`, originalContent] otherwise.
|
||||
*/
|
||||
export declare function insert(content: string, { insertContent, insertPattern }: {
|
||||
insertContent: string;
|
||||
insertPattern: RegExp | string;
|
||||
}, insertBeforeLastOccurrence?: boolean): [boolean, string];
|
50
node_modules/@expo/configure-splash-screen/build/utils/string-utils.js
generated
vendored
Normal file
50
node_modules/@expo/configure-splash-screen/build/utils/string-utils.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.insert = exports.replace = void 0;
|
||||
// runtime polyfills
|
||||
require("core-js/es/string/match-all");
|
||||
/**
|
||||
* @returns [`true`, modifiedContent: string] if replacement is successful, [`false`, originalContent] otherwise.
|
||||
*/
|
||||
function replace(content, { replaceContent, replacePattern }) {
|
||||
const replacePatternOccurrence = content.search(replacePattern);
|
||||
if (replacePatternOccurrence !== -1) {
|
||||
return [true, content.replace(replacePattern, replaceContent)];
|
||||
}
|
||||
return [false, content];
|
||||
}
|
||||
exports.replace = replace;
|
||||
/**
|
||||
* Inserts content just before first occurrence of provided pattern.
|
||||
* @returns [`true`, modifiedContent: string] if insertion is successful, [`false`, originalContent] otherwise.
|
||||
*/
|
||||
function insert(content, { insertContent, insertPattern }, insertBeforeLastOccurrence = false) {
|
||||
if (insertBeforeLastOccurrence) {
|
||||
return insertBeforeLastOccurrenceFun(content, { insertContent, insertPattern });
|
||||
}
|
||||
const insertPatternOccurrence = content.search(insertPattern);
|
||||
if (insertPatternOccurrence !== -1) {
|
||||
return [
|
||||
true,
|
||||
`${content.slice(0, insertPatternOccurrence)}${insertContent}${content.slice(insertPatternOccurrence)}`,
|
||||
];
|
||||
}
|
||||
return [false, content];
|
||||
}
|
||||
exports.insert = insert;
|
||||
/**
|
||||
* Finds last occurrence of provided pattern and inserts content just before it.
|
||||
*@returns [`true`, modifiedContent: string] if insertion is successful, [`false`, originalContent] otherwise.
|
||||
*/
|
||||
function insertBeforeLastOccurrenceFun(content, { insertContent, insertPattern }) {
|
||||
const results = [...content.matchAll(new RegExp(insertPattern, 'gm'))];
|
||||
const patternLastOccurrence = results[results.length - 1];
|
||||
if (!patternLastOccurrence) {
|
||||
return [false, content];
|
||||
}
|
||||
return [
|
||||
true,
|
||||
`${content.slice(0, patternLastOccurrence.index)}${insertContent}${content.slice(patternLastOccurrence.index)}`,
|
||||
];
|
||||
}
|
||||
//# sourceMappingURL=string-utils.js.map
|
1
node_modules/@expo/configure-splash-screen/build/utils/string-utils.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/utils/string-utils.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"string-utils.js","sourceRoot":"","sources":["../../src/utils/string-utils.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,uCAAqC;AAErC;;GAEG;AACH,SAAgB,OAAO,CACrB,OAAe,EACf,EAAE,cAAc,EAAE,cAAc,EAA+D;IAE/F,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAChE,IAAI,wBAAwB,KAAK,CAAC,CA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AG,OAAO,CAAC,KAAK,CAC9E,qBAAqB,CAAC,KAAK,CAC5B,EAAE;KACJ,CAAC;AACJ,CAAC","sourcesContent":["// runtime polyfills\nimport 'core-js/es/string/match-all';\n\n/**\n * @returns [`true`, modifiedContent: string] if replacement is successful, [`false`, originalContent] otherwise.\n */\nexport function replace(\n content: string,\n { replaceContent, replacePattern }: { replaceContent: string; replacePattern: string | RegExp }\n): [boolean, string] {\n const replacePatternOccurrence = content.search(replacePattern);\n if (replacePatternOccurrence !== -1) {\n return [true, content.replace(replacePattern, replaceContent)];\n }\n return [false, content];\n}\n\n/**\n * Inserts content just before first occurrence of provided pattern.\n * @returns [`true`, modifiedContent: string] if insertion is successful, [`false`, originalContent] otherwise.\n */\nexport function insert(\n content: string,\n { insertContent, insertPattern }: { insertContent: string; insertPattern: RegExp | string },\n insertBeforeLastOccurrence: boolean = false\n): [boolean, string] {\n if (insertBeforeLastOccurrence) {\n return insertBeforeLastOccurrenceFun(content, { insertContent, insertPattern });\n }\n const insertPatternOccurrence = content.search(insertPattern);\n if (insertPatternOccurrence !== -1) {\n return [\n true,\n `${content.slice(0, insertPatternOccurrence)}${insertContent}${content.slice(\n insertPatternOccurrence\n )}`,\n ];\n }\n return [false, content];\n}\n\n/**\n * Finds last occurrence of provided pattern and inserts content just before it.\n *@returns [`true`, modifiedContent: string] if insertion is successful, [`false`, originalContent] otherwise.\n */\nfunction insertBeforeLastOccurrenceFun(\n content: string,\n { insertContent, insertPattern }: { insertContent: string; insertPattern: RegExp | string }\n): [boolean, string] {\n const results = [...content.matchAll(new RegExp(insertPattern, 'gm'))];\n const patternLastOccurrence = results[results.length - 1];\n if (!patternLastOccurrence) {\n return [false, content];\n }\n return [\n true,\n `${content.slice(0, patternLastOccurrence.index)}${insertContent}${content.slice(\n patternLastOccurrence.index\n )}`,\n ];\n}\n"]}
|
Reference in New Issue
Block a user