Skip to content

Commit b2929e3

Browse files
committed
fix: add build and node node modules in husky hook
1 parent 04cd479 commit b2929e3

93 files changed

Lines changed: 1081 additions & 769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/expo.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"use strict";
2-
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
2+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1010
};
11-
const __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
const result = {};
14-
if (mod != null) for (const k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
11+
var __importStar = (this && this.__importStar) || function (mod) {
12+
if (mod && mod.__esModule) return mod;
13+
var result = {};
14+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15+
result["default"] = mod;
16+
return result;
1717
};
1818
Object.defineProperty(exports, "__esModule", { value: true });
1919
const core = __importStar(require("@actions/core"));
@@ -24,13 +24,13 @@ const cli = __importStar(require("@actions/exec"));
2424
* It uses the `EXPO_CLI_PASSWORD` environment variable for improved security.
2525
*/
2626
function authenticate(username, password) {
27-
return __awaiter(this, void 0, void 0, function* () {
28-
if (!username || !password) {
29-
return core.debug('Skipping authentication, `expo-username` and/or `expo-password` not set...');
30-
}
31-
yield cli.exec('expo', ['login', `--username=${username}`], {
32-
env: Object.assign(Object.assign({}, process.env), { EXPO_CLI_PASSWORD: password }),
33-
});
34-
});
27+
return __awaiter(this, void 0, void 0, function* () {
28+
if (!username || !password) {
29+
return core.debug('Skipping authentication, `expo-username` and/or `expo-password` not set...');
30+
}
31+
yield cli.exec('expo', ['login', `--username=${username}`], {
32+
env: Object.assign(Object.assign({}, process.env), { EXPO_CLI_PASSWORD: password }),
33+
});
34+
});
3535
}
3636
exports.authenticate = authenticate;

build/index.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
"use strict";
2-
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
2+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
1212
const core_1 = require("@actions/core");
1313
const expo_1 = require("./expo");
1414
const install_1 = require("./install");
1515
function run() {
16-
return __awaiter(this, void 0, void 0, function* () {
17-
const path = yield install_1.install(core_1.getInput('expo-version') || 'latest', core_1.getInput('expo-packager') || 'npm');
18-
core_1.addPath(path);
19-
yield expo_1.authenticate(core_1.getInput('expo-username'), core_1.getInput('expo-password'));
20-
});
16+
return __awaiter(this, void 0, void 0, function* () {
17+
const path = yield install_1.install(core_1.getInput('expo-version') || 'latest', core_1.getInput('expo-packager') || 'npm');
18+
core_1.addPath(path);
19+
yield expo_1.authenticate(core_1.getInput('expo-username'), core_1.getInput('expo-password'));
20+
});
2121
}
2222
exports.run = run;
2323
run();

build/install.js

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
"use strict";
2-
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
2+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1010
};
11-
const __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
const result = {};
14-
if (mod != null) for (const k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
11+
var __importStar = (this && this.__importStar) || function (mod) {
12+
if (mod && mod.__esModule) return mod;
13+
var result = {};
14+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15+
result["default"] = mod;
16+
return result;
1717
};
1818
Object.defineProperty(exports, "__esModule", { value: true });
1919
const cache = __importStar(require("@actions/tool-cache"));
2020
const cli = __importStar(require("@actions/exec"));
2121
const io = __importStar(require("@actions/io"));
2222
const path = __importStar(require("path"));
23+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2324
const registry = require('libnpm');
2425
/**
2526
* Resolve the provided semver to exact version of `expo-cli`.
2627
* This uses the npm registry and accepts latest, dist-tags or version ranges.
2728
* It's used to determine the cached version of `expo-cli`.
2829
*/
2930
function resolve(version) {
30-
return __awaiter(this, void 0, void 0, function* () {
31-
return (yield registry.manifest(`expo-cli@${version}`)).version;
32-
});
31+
return __awaiter(this, void 0, void 0, function* () {
32+
return (yield registry.manifest(`expo-cli@${version}`)).version;
33+
});
3334
}
3435
exports.resolve = resolve;
3536
/**
@@ -38,29 +39,29 @@ exports.resolve = resolve;
3839
* It returns the path where Expo is installed.
3940
*/
4041
function install(version, packager) {
41-
return __awaiter(this, void 0, void 0, function* () {
42-
const exact = yield resolve(version);
43-
let root = yield fromCache(exact);
44-
if (!root) {
45-
root = yield fromPackager(exact, packager);
46-
root = yield toCache(exact, root);
47-
}
48-
return path.join(root, 'node_modules', '.bin');
49-
});
42+
return __awaiter(this, void 0, void 0, function* () {
43+
const exact = yield resolve(version);
44+
let root = yield fromCache(exact);
45+
if (!root) {
46+
root = yield fromPackager(exact, packager);
47+
root = yield toCache(exact, root);
48+
}
49+
return path.join(root, 'node_modules', '.bin');
50+
});
5051
}
5152
exports.install = install;
5253
/**
5354
* Install `expo-cli`, by version, using npm or yarn.
5455
* It creates a temporary directory to store all required files.
5556
*/
5657
function fromPackager(version, packager) {
57-
return __awaiter(this, void 0, void 0, function* () {
58-
const root = process.env['RUNNER_TEMP'] || '';
59-
const tool = yield io.which(packager);
60-
yield io.mkdirP(root);
61-
yield cli.exec(tool, ['add', `expo-cli@${version}`], { cwd: root });
62-
return root;
63-
});
58+
return __awaiter(this, void 0, void 0, function* () {
59+
const root = process.env['RUNNER_TEMP'] || '';
60+
const tool = yield io.which(packager);
61+
yield io.mkdirP(root);
62+
yield cli.exec(tool, ['add', `expo-cli@${version}`], { cwd: root });
63+
return root;
64+
});
6465
}
6566
exports.fromPackager = fromPackager;
6667
/**
@@ -70,9 +71,9 @@ exports.fromPackager = fromPackager;
7071
* @see https://github.com/actions/toolkit/issues/47
7172
*/
7273
function fromCache(version) {
73-
return __awaiter(this, void 0, void 0, function* () {
74-
return cache.find('expo-cli', version);
75-
});
74+
return __awaiter(this, void 0, void 0, function* () {
75+
return cache.find('expo-cli', version);
76+
});
7677
}
7778
exports.fromCache = fromCache;
7879
/**
@@ -82,8 +83,8 @@ exports.fromCache = fromCache;
8283
* @see https://github.com/actions/toolkit/issues/47
8384
*/
8485
function toCache(version, root) {
85-
return __awaiter(this, void 0, void 0, function* () {
86-
return cache.cacheDir(root, 'expo-cli', version);
87-
});
86+
return __awaiter(this, void 0, void 0, function* () {
87+
return cache.cacheDir(root, 'expo-cli', version);
88+
});
8889
}
8990
exports.toCache = toCache;

node_modules/@babel/code-frame/package.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/eslint-visitor-keys/package.json

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/json-schema/package.json

Lines changed: 16 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@typescript-eslint/eslint-plugin/package.json

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)