open-index/open-npm huggingface dataset:
npm package: @goodness.inc/contentful-shopify-sync
Description: Sync Shopify content to Contentful as entries
Author: Goodness Inc.
Latest version: 1.1.0

# @goodness.inc/contentful-shopify-sync

Sync Shopify content to Contentful as entries

## Usage

```sh
npx @goodness.inc/contentful-shopify-sync products \
  --store-handles=store.myshopify.com,store-dev.myshopify.com \
  --storefront-access-tokens=abc123,def456 \
  --space-id=abc123 \
  --cma-access-token=abc123
```

Run `npx @goodness.inc/contentful-shopify-sync products --help` to see additional options.

### Actions

The expected use case is to call this from a GitHub action on some schedule to keep your Contentful Space up to date to new Products that have been added to Shopify. Here's an example workflow you can use:

```yml
name: 🔄 Sync

on:
  schedule:
    - cron: '0 8 * * *' # Runs daily at 8AM UTC (12AM PST / 1AM PDT)
  workflow_dispatch:

permissions:
  contents: read

env:
  PUBLIC_STOREFRONT_API_TOKEN_PROD: ${{ vars.PUBLIC_STOREFRONT_API_TOKEN_PROD }}
  PUBLIC_STOREFRONT_API_TOKEN_DEV: ${{ vars.PUBLIC_STOREFRONT_API_TOKEN_DEV }}
  PUBLIC_STORE_DOMAIN_PROD: ${{ vars.PUBLIC_STORE_DOMAIN_PROD }}
  PUBLIC_STORE_DOMAIN_DEV: ${{ vars.PUBLIC_STORE_DOMAIN_DEV }}
  CONTENTFUL_SPACE_ID: ${{ vars.CONTENTFUL_SPACE_ID }}
  CONTENTFUL_CMA_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_CMA_ACCESS_TOKEN }}

jobs:
  products:
    name: Sync Shopify products to Contentful
    runs-on: ubuntu-latest

    steps:
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Run @goodness.inc/contentful-shopify-sync
        run: |
          npx @goodness.inc/contentful-shopify-sync products \
            --store-domains="${PUBLIC_STORE_DOMAIN_PROD},${PUBLIC_STORE_DOMAIN_DEV}" \
            --storefront-access-tokens="${PUBLIC_STOREFRONT_API_TOKEN_PROD},${PUBLIC_STOREFRONT_API_TOKEN_DEV}" \
            --space-id=${CONTENTFUL_SPACE_ID} \
            --cma-access-token=${CONTENTFUL_CMA_ACCESS_TOKEN}
```

## Contributing

To work on this locally, run `npm link` from this project to create a global symlink to this dir. Then, in one terminal run `yarn dev` (to build on code change) and in another run `contentful-shopify-sync` everytime you want to test execute.

### TODO

- [ ] Support more than 250 Products per Store
- [x] Un-publish / archive Contentful entries that are missing from Shopify
npm package: @goodpie/jquery-search-input
Description: Adds autocomplete functionality to input boxes using JQuery
Author: Brandyn Britton
Latest version: 0.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Jquery Input Autocomplete

This project is a personal project designed to provide basic autocomplete functionality from a set of predefined values.
The existing [autocomplete](https://jqueryui.com/autocomplete/) didn't provide the functionality (as far as I could tell) 
that I wanted which mainly includes the ability to autocomplete tags seperated by a comma.

## Usage

See the demo for an example on how to use it

Attach the input autocomplete to the desired input:

```
$("#testInput").inputAutocomplete({
    predictableText: ["HelloWorld", "Harry", "Hell", "Hello", "Hero"]
});
```

## Options

| Option              | Values   | Default        | Description                    |
| ------------------- | -------- | -------------- | ------------------------------ |
| predictableText     | string[] | []             | Text to use for predictions    |
npm package: @goodrequest/antd-form-fields
Description: From this package you can import all basic form fields components and also wrappers for regression testing using cypress framework.
Author: Roman Haluska
Latest version: 1.0.1

# antd-form-fields

From this package you can import all basic form fields components and also wrappers for regression testing using cypress framework.

## Implementation

First you need to install the module as dev dependency into your project.
```sh
npm install --save-dev GoodRequest/antd-form-fields
```
### Form fileds
This is all types of form fields which module contains
- CheckboxField, CheckboxGroupField, RadioGroupField
- DateField, DateRangeField, DateRangePickerField, TimeField, TimeRangeField
- FileUploadField, ImdUploadField
- InputField, InputMaskedField, InputNumberField, InputPasswordField, TextareaField
- SwitchField, ToggleField
- SelectField

##### Usage
Import form field in component where you want to use it.
```
import { InputField } from 'antd-form-fields'
```
### Cypress commands
| Type | Selector |
| ------ | ------ |
| API Authentication with access and refresh token | cy.apiAuth() |
| InputField | cy.setInputValue() |
| SelectField | cy.selectOptionDropdown(), cy.clearDropdownSelection() |
| SelectField with search | cy.setSearchBoxValueAndSelectFirstOption() |
| FileUploadField, ImdUploadField  | cy.uploadFile() |
| Button | cy.clickButton () |
| DeleteButton | cy.clickDeleteButtonWithConf() |
| Check success toast message | cy.checkSuccessToastMessage() |
| CheckboxField, CheckboxGroupField, RadioGroupField | cy.checkFirstCheckBox() |

##### Usage
If you want to use form fields selector for cypress tests you need import package and initialize method to  `cypress/support/commands.ts` file
```
import 'antd-form-fields'
import initializeCustomCommands from 'antd-form-fields/dist/commands/cypressCommands'

initializeCustomCommands()
```

## Development
storybook needs as a dependency react and react dom.

npm run set-local-development

dont forgot to unset after you done

npm run unset-local-development

Run storybook to check form fields.

```sh
npm run storybook
```
#### Building for source

For production release:
```sh
npm run build
```

### Tailwind-styles

Tailwind styles are set though variables in consumer (+ only in form), which is why they will not be applied in storybook.
npm package: @goodrequest/convert-translations-i18next
Description: This scripts are converting JSON files which is generated by  [ i18next ](https://www.npmjs.com/package/i18next) to CSV file and also back from CSV to JSON files.
Author: Roman Haluska
Latest version: 1.0.9

# JSON to CSV converter script for i18next translations #

This scripts are converting JSON files which is generated by  [ i18next ](https://www.npmjs.com/package/i18next)
to CSV file and also back from CSV to JSON files.

### Implementation ###

First you need to install the module as dev dependency into you project.
```sh
npm install --save-dev @goodrequest/convert-translations-i18next
```

Example of script to convert from json to csv
```sh
npx convert-json-to-csv @goodrequest/convert-translations-i18next
```
Example of script to convert back from csv to json
```sh
npx convert-csv-to-json @goodrequest/convert-translations-i18next
```
This is what a config file looks like
```
{
        // csv delimiter which is used in CSV file, default value is ';'
	"csvDelimiter": ";",
	// path for csv file, default value is "/public/translations.csv"
	"filePathForGeneratedCSV": "/public/translations.csv",
	// the languages which you want to convert, default value is all files which scripts founds
	"supportedLanguages":["cz", "sk", "en"],
	// the json files which you want to convert, default value is all files which scripts founds
	"includeFiles": ["loc", "paths"],
	// path for json files which is generated by i18next scanner, default value is "/public/locales"
	"pathToDirectoryForLocales": "/public/locales"
}
```
Default config
```
{
  "csvDelimiter": ";",
  "filePathForGeneratedCSV": "/public/translations.csv",
  "pathToDirectoryForLocales": "/public/locales"
}
```
You can also use your own config file. First option is to add config file `i18JsonToCsv.config.json` in to root folder.
Second option is to pass path to your config file using process environment `CONFIG_PATH`.
```sh
npx cross-env CONFIG_PATH=/scripts/configs/myConfig.json convert-csv-to-json GoodRequest/i18nextJsonToCsv
```
npm package: @goodrequest/joi-type-extract
Description: Solution that extractes types from joi schemas.
Author: Goodrequest
Latest version: 0.0.5

# joi-type-extract
Clone of https://github.com/TCMiranda/joi-extract-type<br>

## Setup
1. Install package
	```bash
	npm install @goodrequest/joi-type-extract
	or
	yarn add @goodrequest/joi-type-extract
	```
2. Create ./src/types/joi/index.d.ts and import package in it, which will extend Joi types
   ```Typescript
   import '@goodrequest/joi-type-extract'
   ```
3. Add this compiler option and include created file in tsconfig.json in typeRoots
	```Json
	{
		"compilerOptions": {
            "strictNullChecks": true,
			"typeRoots": [
				"./src/types"
			]
		}
	}
	```

## Usage example

```Typescript
import Joi from 'joi'

export const requestSchema = () =>
	Joi.object({
		params: Joi.object({
			userID: Joi.number().required()
		}),
		query: Joi.object({
			search: Joi.string().required()
		}),
		body: Joi.object({
			name: Joi.string().required()
		})
	})

export const responseSchema = Joi.object({
   messages: Joi.array().items({
	   message: Joi.string().required(),
	   type: Joi.string().valid(MESSAGE_TYPE.SUCCESS).required()
   }).required()
})

type RequestType = Joi.extractType<ReturnType<typeof requestSchema>>
type ResponseType = Joi.extractType<typeof fullMessagesResponseSchema>
```
Extracted EequestType and ResponseType can be then used in express.Request and express.Response types
```Typescript
import { Request, Response, NextFunction } from 'express'

const businessLogic = async (
	req: Request<RequestType['params'], ResponseType, RequestType['body'], RequestType['query']>,
	res: Response<ResponseType>,
	next: NextFunction
) => {
	const { params, query, body } = req

	// params.userID will have number type
	// query.serch will have string type
	// body.name will have string type

	// response will be enforced to be same as ResponseType
	return res.json({
		messages: [
			{
				message: 'Response message',
				type: MESSAGE_TYPE.SUCCESS
			}
		]
	})
}
```