{"id":17662362,"url":"https://github.com/asd-xiv/serverless-universal-packer","last_synced_at":"2025-07-20T16:35:55.598Z","repository":{"id":162570918,"uuid":"635941529","full_name":"asd-xiv/serverless-universal-packer","owner":"asd-xiv","description":"📦 Serverless plugin for custom packaging using BASH scripts with little to no dependencies.","archived":false,"fork":false,"pushed_at":"2024-12-05T09:13:53.000Z","size":676,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-02T11:03:49.660Z","etag":null,"topics":["bash","serverless","serverless-offline","serverless-package","serverless-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asd-xiv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-03T19:37:28.000Z","updated_at":"2024-12-05T09:13:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b32bf16-4504-4f1e-b119-7cb87eee6129","html_url":"https://github.com/asd-xiv/serverless-universal-packer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"andreidmt/tpl-ts-jsdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Fserverless-universal-packer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Fserverless-universal-packer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Fserverless-universal-packer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Fserverless-universal-packer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asd-xiv","download_url":"https://codeload.github.com/asd-xiv/serverless-universal-packer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Fserverless-universal-packer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258322466,"owners_count":22682932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","serverless","serverless-offline","serverless-package","serverless-plugin"],"created_at":"2024-10-23T18:07:31.646Z","updated_at":"2025-06-11T19:32:33.801Z","avatar_url":"https://github.com/asd-xiv.png","language":"JavaScript","readme":"\u003c!-- markdownlint-disable first-line-h1 line-length no-inline-html --\u003e\n\n\u003ch1 align=\"center\"\u003e\n  :package: serverless-universal-packer\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://dl.circleci.com/status-badge/redirect/gh/asd-xiv/serverless-universal-packer/tree/main\" target=\"_blank\"\u003e\n    \u003cimg alt=\"CircleCI\" src=\"https://dl.circleci.com/status-badge/img/gh/asd-xiv/serverless-universal-packer/tree/main.svg?style=svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/asd-xiv/serverless-universal-packer?branch=main\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Coverage Status\" src=\"https://coveralls.io/repos/github/asd-xiv/serverless-universal-packer/badge.svg?branch=main\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@asd14/serverless-universal-packer?activeTab=dependencies\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Dependencies\" src=\"https://img.shields.io/badge/dependencies-0%20packages-green\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@asd14/serverless-universal-packer\" target=\"_blank\"\u003e\n    \u003cimg alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/@asd14/serverless-universal-packer?label=npm%40latest\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Semantic Release with Conventional Commits\" src=\"https://img.shields.io/badge/semantic--release-conventionalcommits-green\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Serverless plugin for custom packaging using BASH scripts with little to no\n\u003e dependencies.\n\n- :hammer_and_wrench: **Flexibility**: Don't rely on the existence of\n  specialized plugins interfacing bundler X. Easily pivot when a better suited\n  builder comes out.\n- :green_square: **Low complexity**: Specialized plugins mostly just proxy to\n  the underlying bundler. You can do that yourself in a few command lines.\n- :repeat: **Stay Updated**: Keep dependencies updated without waiting for\n  plugin updates.\n\n## Table of contents\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n- [:inbox_tray: Install](#inbox_tray-install)\n- [:wrench: Custom BASH scripts](#wrench-custom-bash-scripts)\n  - [`npm-pack-ws-fix`](#npm-pack-ws-fix)\n  - [`convert-to-aws-zip`](#convert-to-aws-zip)\n- [:books: Examples](#books-examples)\n  - [:package: NPM](#package-npm)\n  - [:large_blue_diamond: Typescript](#large_blue_diamond-typescript)\n  - [:zap: SWC](#zap-swc)\n- [:computer: Development](#computer-development)\n- [:scroll: Changelog](#scroll-changelog)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## :inbox_tray: Install\n\n```bash\nnpm install --save-dev serverless-universal-packer\n```\n\n## :wrench: Custom BASH scripts\n\n### `npm-pack-ws-fix`\n\nCurrently running `npm pack` inside a workspace/monorepo package will not\ninclude dependencies hoisted to the root `node_modules` folder. This is a\n[:bug: known issue](https://github.com/npm/cli/issues/3466).\n\nThis script is a temporary workaround until the issue is fixed. It's meant to be\nrun inside a child package folder, and will create a `.tgz` file in the root\nfolder.\n\nInternally it copies missing dependencies from the root `node_modules` into\nchild package `node_modules` and runs `npm pack`. After the package is created,\nthe original child `node_modules` is restored.\n\n```bash\ncd packages/my-package\nnpx npm-pack-ws-fix\n```\n\n### `convert-to-aws-zip`\n\nAWS Lambda requires a `.zip` file containing the `package.json` and the\n`node_modules` folder.\n\n`npm-pack-ws-fix`, which internaly uses `npm pack`, creates a `.tgz` file with\nan extra folder, `package`, containing the package files. This script extracts\nthe `.tgz` file and recreates the `.zip` without the extra folder.\n\n## :books: Examples\n\n### :package: NPM\n\nWithout any additional packages, NPM provides a built-in mechanic to package\nyour code using [`npm pack`][examples_npm_npm-pack]. This will create a `.tgz`\nfile in the root of your project.\n\n#### [`files`][examples_npm_files] : `string[]`\n\n\u003e The optional files field is an array of file patterns that describes the\n\u003e entries to be included when your package is installed as a dependency\n\n#### [`bundleDependencies`][examples_npm_bundled-dependencies] : `string[] | boolean`\n\n\u003e This defines an array of package names that will be bundled when publishing\n\u003e the package.\n\n[examples_npm_npm-pack]: https://docs.npmjs.com/cli/v9/commands/npm-pack\n[examples_npm_files]:\n  https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files\n[examples_npm_bundled-dependencies]:\n  https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bundledependencies\n\n```json\n// package.json\n{\n  \"files\": [\"src\"],\n  \"bundleDependencies\": true\n}\n```\n\n```yaml\n# serverless.yml\nplugins:\n  - serverless-shell-packer\n\ncustom:\n  shellPacker:\n    script:\n      - tgz_path=$(npx npm-pack-ws-fix | tail -n 1)\n      - npx convert-to-aws-zip \"$tgz_path\" | tail -n 1\n```\n\n### :large_blue_diamond: Typescript\n\n### :zap: SWC\n\n## :computer: Development\n\n```bash\ngit clone git@github.com:asd-xiv/serverless-universal-packer.git asd14.serverless-shell-packer\n```\n\n## :scroll: Changelog\n\nSee the [releases section][changelog_releases] for details.\n\n[changelog_releases]:\n  https://github.com/asd-xiv/serverless-universal-packer/releases\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasd-xiv%2Fserverless-universal-packer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasd-xiv%2Fserverless-universal-packer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasd-xiv%2Fserverless-universal-packer/lists"}