mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-23 05:22:07 +01:00
Merge pull request #45 from DeterminateSystems/prettier-config
Add prettier config
This commit is contained in:
commit
ab33fc26af
7 changed files with 46 additions and 34 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
|||
- name: Install pnpm dependencies
|
||||
run: nix develop --command pnpm install
|
||||
- name: Check formatting
|
||||
run: nix develop --command pnpm run format
|
||||
run: nix develop --command pnpm run check-fmt
|
||||
- name: Lint
|
||||
run: nix develop --command pnpm run lint
|
||||
- name: Build
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
dist
|
||||
pnpm-lock.yaml
|
||||
|
||||
|
|
48
dist/index.js
generated
vendored
48
dist/index.js
generated
vendored
|
@ -86777,24 +86777,22 @@ var __webpack_exports__ = {};
|
|||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
|
||||
;// CONCATENATED MODULE: external "node:fs/promises"
|
||||
const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises");
|
||||
// EXTERNAL MODULE: external "node:os"
|
||||
var external_node_os_ = __nccwpck_require__(612);
|
||||
;// CONCATENATED MODULE: external "node:path"
|
||||
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
|
||||
;// CONCATENATED MODULE: external "node:child_process"
|
||||
const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
|
||||
;// CONCATENATED MODULE: external "node:fs"
|
||||
const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
|
||||
// EXTERNAL MODULE: external "node:util"
|
||||
var external_node_util_ = __nccwpck_require__(7261);
|
||||
// EXTERNAL MODULE: external "http"
|
||||
var external_http_ = __nccwpck_require__(3685);
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js
|
||||
var core = __nccwpck_require__(9093);
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/tail@2.2.6/node_modules/tail/lib/tail.js
|
||||
var tail = __nccwpck_require__(3707);
|
||||
;// CONCATENATED MODULE: external "node:fs"
|
||||
const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
|
||||
// EXTERNAL MODULE: external "node:os"
|
||||
var external_node_os_ = __nccwpck_require__(612);
|
||||
// EXTERNAL MODULE: external "node:util"
|
||||
var external_node_util_ = __nccwpck_require__(7261);
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js
|
||||
var exec = __nccwpck_require__(7775);
|
||||
// EXTERNAL MODULE: external "os"
|
||||
var external_os_ = __nccwpck_require__(2037);
|
||||
;// CONCATENATED MODULE: external "node:crypto"
|
||||
const external_node_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto");
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+cache@3.2.4/node_modules/@actions/cache/lib/cache.js
|
||||
var cache = __nccwpck_require__(6878);
|
||||
;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@6.2.0/node_modules/@sindresorhus/is/dist/index.js
|
||||
const typedArrayTypeNames = [
|
||||
'Int8Array',
|
||||
|
@ -88491,8 +88489,6 @@ const timer = (request) => {
|
|||
|
||||
;// CONCATENATED MODULE: external "node:url"
|
||||
const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url");
|
||||
;// CONCATENATED MODULE: external "node:crypto"
|
||||
const external_node_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto");
|
||||
;// CONCATENATED MODULE: ./node_modules/.pnpm/normalize-url@8.0.1/node_modules/normalize-url/index.js
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
||||
const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain';
|
||||
|
@ -93746,12 +93742,10 @@ const got = source_create(defaults);
|
|||
|
||||
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js
|
||||
var exec = __nccwpck_require__(7775);
|
||||
// EXTERNAL MODULE: external "os"
|
||||
var external_os_ = __nccwpck_require__(2037);
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+cache@3.2.4/node_modules/@actions/cache/lib/cache.js
|
||||
var cache = __nccwpck_require__(6878);
|
||||
;// CONCATENATED MODULE: external "node:fs/promises"
|
||||
const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises");
|
||||
;// CONCATENATED MODULE: external "node:path"
|
||||
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
|
||||
;// CONCATENATED MODULE: external "node:stream/promises"
|
||||
const external_node_stream_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream/promises");
|
||||
;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@56a244c061429692b1c7d80fc068d684db3ae4d2_nqhbjyaof246q4gvygpbo6m4na/node_modules/detsys-ts/dist/index.js
|
||||
|
@ -94619,6 +94613,12 @@ function mungeDiagnosticEndpoint(inputUrl) {
|
|||
* Copyright (c) 2018-2020 [Samuel Carreira]
|
||||
*/
|
||||
//# sourceMappingURL=index.js.map
|
||||
// EXTERNAL MODULE: external "http"
|
||||
var external_http_ = __nccwpck_require__(3685);
|
||||
;// CONCATENATED MODULE: external "node:child_process"
|
||||
const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
|
||||
// EXTERNAL MODULE: ./node_modules/.pnpm/tail@2.2.6/node_modules/tail/lib/tail.js
|
||||
var tail = __nccwpck_require__(3707);
|
||||
;// CONCATENATED MODULE: ./dist/index.js
|
||||
// src/index.ts
|
||||
|
||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@
|
|||
"scripts": {
|
||||
"build": "tsup",
|
||||
"format": "prettier --write .",
|
||||
"check-fmt": "prettier --check .",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"package": "ncc build",
|
||||
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
|
||||
|
|
12
prettier.config.cjs
Normal file
12
prettier.config.cjs
Normal file
|
@ -0,0 +1,12 @@
|
|||
/** @type {import('prettier').Config} */
|
||||
module.exports = {
|
||||
plugins: [require.resolve("@trivago/prettier-plugin-sort-imports")],
|
||||
semi: true,
|
||||
singleQuote: false,
|
||||
tabWidth: 2,
|
||||
trailingComma: "all",
|
||||
useTabs: false,
|
||||
// Import sorting
|
||||
importOrderSeparation: true,
|
||||
importOrderSortSpecifiers: true,
|
||||
};
|
13
src/index.ts
13
src/index.ts
|
@ -1,15 +1,14 @@
|
|||
import * as core from "@actions/core";
|
||||
import { IdsToolbox } from "detsys-ts";
|
||||
import got from "got";
|
||||
import * as http from "http";
|
||||
import { SpawnOptions, exec, spawn } from "node:child_process";
|
||||
import { openSync, readFileSync } from "node:fs";
|
||||
import * as fs from "node:fs/promises";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { spawn, exec, SpawnOptions } from "node:child_process";
|
||||
import { openSync, readFileSync } from "node:fs";
|
||||
import { inspect, promisify } from "node:util";
|
||||
import * as http from "http";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import { Tail } from "tail";
|
||||
import got from "got";
|
||||
import { IdsToolbox } from "detsys-ts";
|
||||
|
||||
const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
||||
|
||||
|
|
Loading…
Reference in a new issue